mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-14 19:51:50 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39bbba7184 |
+1
-9
@@ -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
|
||||
|
||||
@@ -60,6 +60,7 @@ function update_script() {
|
||||
|
||||
msg_info "Updating Pelican Panel"
|
||||
cp -a /opt/backup/.env /opt/pelican-panel/
|
||||
grep -q "^APP_URL=http://panel.test$" /opt/pelican-panel/.env && sed -i "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}|" /opt/pelican-panel/.env
|
||||
$SQLITE_INSTALL && mv /opt/backup/*.sqlite /opt/pelican-panel/database/
|
||||
cp -a /opt/backup/storage/app/public /opt/pelican-panel/storage/app/
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -27,6 +27,7 @@ msg_info "Installing Pelican Panel"
|
||||
cd /opt/pelican-panel
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
$STD php artisan p:environment:setup
|
||||
sed -i "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}|" /opt/pelican-panel/.env
|
||||
echo "yes" | $STD php artisan p:environment:database --driver mariadb --host localhost --port 3306 --database "$MARIADB_DB_NAME" --username "$MARIADB_DB_USER" --password "$MARIADB_DB_PASS"
|
||||
$STD php artisan p:environment:queue-service --no-interaction
|
||||
echo "* * * * * php /opt/pelican-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
|
||||
|
||||
Reference in New Issue
Block a user