Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk dbaea07c06 calibre-web: install as package for 0.6.27's src-layout restructure 2026-08-14 09:50:40 +02:00
4 changed files with 10 additions and 15 deletions
+1 -9
View File
@@ -39,15 +39,7 @@ function update_script() {
/opt/ampache/public/play/.htaccess \
/opt/ampache/advanced-config
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
if [[ "$CURRENT_PHP" != "8.5" ]]; then
msg_info "Migrating PHP $CURRENT_PHP to 8.5"
$STD apt remove -y php"${CURRENT_PHP//./}"*
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
msg_ok "Migrated PHP $CURRENT_PHP to 8.5"
fi
fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.5.zip"
fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
restore_backup
chmod 664 /opt/ampache/public/rest/.htaccess /opt/ampache/public/play/.htaccess
+4 -1
View File
@@ -45,9 +45,12 @@ function update_script() {
cd /opt/calibre-web
$STD uv venv --clear /opt/calibre-web/.venv
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir --upgrade pip setuptools wheel
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir -r requirements.txt
$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|' /etc/systemd/system/calibre-web.service
$STD systemctl daemon-reload
restore_backup
msg_info "Starting Service"
+3 -3
View File
@@ -27,11 +27,11 @@ $STD apt install -y \
libvpx-dev
msg_ok "Installed dependencies"
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
setup_mariadb
MARIADB_DB_USER="ampache" MARIADB_DB_NAME="ampache" setup_mariadb_db
fetch_and_deploy_gh_release "ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.5.zip"
fetch_and_deploy_gh_release "ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
msg_info "Setting up Ampache"
rm -rf /var/www/html
@@ -58,7 +58,7 @@ msg_info "Configuring PHP"
sed -i -e 's/upload_max_filesize = .*/upload_max_filesize = 100M/' \
-e 's/post_max_size = .*/post_max_size = 100M/' \
-e 's/max_execution_time = .*/max_execution_time = 600/' \
-e 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.5/apache2/php.ini
-e 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.4/apache2/php.ini
$STD a2enmod rewrite
$STD systemctl restart apache2
msg_ok "Configured PHP"
+2 -2
View File
@@ -39,7 +39,7 @@ msg_info "Installing Python Dependencies"
cd /opt/calibre-web
$STD uv venv
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir --upgrade pip setuptools wheel
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir -r requirements.txt
$STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir .
msg_ok "Installed Python Dependencies"
msg_info "Creating Service"
@@ -54,7 +54,7 @@ Type=simple
User=root
Environment="QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox"
WorkingDirectory=/opt/calibre-web
ExecStart=/opt/calibre-web/.venv/bin/python /opt/calibre-web/cps.py
ExecStart=/opt/calibre-web/.venv/bin/cps
Restart=on-failure
RestartSec=5