mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-28 11:05:42 +00:00
Compare commits
1 Commits
fix-calibr
...
fix-mastod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e077a0e10 |
@@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: mikolaj92
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@@ -37,7 +35,8 @@ function update_script() {
|
||||
systemctl stop calibre-web
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
create_backup /opt/calibre-web/data
|
||||
create_backup /opt/calibre-web/app.db \
|
||||
/opt/calibre-web/data
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Calibre-Web" "janeczku/calibre-web" "prebuild" "latest" "/opt/calibre-web" "calibreweb*.tar.gz"
|
||||
setup_uv
|
||||
@@ -49,10 +48,7 @@ function update_script() {
|
||||
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir .
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
sed -i 's|^ExecStart=.*|ExecStart=/opt/calibre-web/.venv/bin/cps -p /opt/calibre-web/data/app.db|' /etc/systemd/system/calibre-web.service
|
||||
if ! grep -q '^Environment=HOME=' /etc/systemd/system/calibre-web.service; then
|
||||
sed -i '/^ExecStart=/i Environment=HOME=/opt/calibre-web/data' /etc/systemd/system/calibre-web.service
|
||||
fi
|
||||
sed -i 's|^ExecStart=.*|ExecStart=/opt/calibre-web/.venv/bin/cps|' /etc/systemd/system/calibre-web.service
|
||||
$STD systemctl daemon-reload
|
||||
|
||||
restore_backup
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@@ -40,6 +42,7 @@ function update_script() {
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mastodon" "mastodon/mastodon" "tarball"
|
||||
sed -i "s/config.force_ssl = true/config.force_ssl = ENV.fetch('LOCAL_HTTPS', 'false') == 'true'/" /opt/mastodon/config/environments/production.rb
|
||||
sed -i "s/https = Rails.env.production? || ENV\['LOCAL_HTTPS'\] == 'true'/https = ENV.fetch('LOCAL_HTTPS', 'false') == 'true'/" /opt/mastodon/config/initializers/1_hosts.rb
|
||||
RUBY_VERSION="$(cat /opt/mastodon/.ruby-version)" RUBY_INSTALL_RAILS="false" setup_ruby
|
||||
|
||||
msg_info "Installing Ruby Dependencies"
|
||||
cd /opt/mastodon
|
||||
|
||||
@@ -53,9 +53,8 @@ After=network.target
|
||||
Type=simple
|
||||
User=root
|
||||
Environment="QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox"
|
||||
Environment=HOME=/opt/calibre-web/data
|
||||
WorkingDirectory=/opt/calibre-web
|
||||
ExecStart=/opt/calibre-web/.venv/bin/cps -p /opt/calibre-web/data/app.db
|
||||
ExecStart=/opt/calibre-web/.venv/bin/cps
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="mastodon_production" PG_DB_USER="mastodon" PG_DB_SKIP_ALTER_ROLE="true" setup_postgresql_db
|
||||
$STD sudo -u postgres psql -c "ALTER USER mastodon CREATEDB;"
|
||||
|
||||
RUBY_VERSION="4.0.5" RUBY_INSTALL_RAILS="false" setup_ruby
|
||||
export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
|
||||
|
||||
fetch_and_deploy_gh_release "mastodon" "mastodon/mastodon" "tarball"
|
||||
sed -i "s/config.force_ssl = true/config.force_ssl = ENV.fetch('LOCAL_HTTPS', 'false') == 'true'/" /opt/mastodon/config/environments/production.rb
|
||||
sed -i "s/https = Rails.env.production? || ENV\['LOCAL_HTTPS'\] == 'true'/https = ENV.fetch('LOCAL_HTTPS', 'false') == 'true'/" /opt/mastodon/config/initializers/1_hosts.rb
|
||||
|
||||
RUBY_VERSION="$(cat /opt/mastodon/.ruby-version)" RUBY_INSTALL_RAILS="false" setup_ruby
|
||||
export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
|
||||
|
||||
msg_info "Installing Ruby Dependencies"
|
||||
cd /opt/mastodon
|
||||
$STD bundle config set --local without 'development test'
|
||||
|
||||
Reference in New Issue
Block a user