diff --git a/scripts/_common.sh b/scripts/_common.sh index 7afbec9..4cdc018 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -45,7 +45,7 @@ is_url_handled() { # Return 1 if the URL isn't handled. # Which means either cURL got a 404 (or the admin) or the SSO. # A handled URL should redirect to a publicly accessible URL. - # Return 1 if the url has returned 404 + # Return 1 if the URL has returned 404 if [ "$http_code" = "404" ] || [[ $redirection =~ "/yunohost/admin" ]]; then return 1 # Return 1 if the URL is redirected to the SSO diff --git a/scripts/backup b/scripts/backup index cc4b55f..995b795 100755 --- a/scripts/backup +++ b/scripts/backup @@ -30,15 +30,23 @@ ynh_backup --src_path="$data_dir" --is_big # SYSTEM CONFIGURATION #================================================= +# Backup the PHP-FPM configuration ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +# Backup the nginx configuration ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +# Backup the logrotate configuration ynh_backup --src_path="/etc/logrotate.d/$app" +# Backup the Fail2Ban config ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" +#================================================= +# BACKUP VARIOUS FILES +#================================================= + ynh_backup --src_path="/etc/cron.d/$app" ynh_backup --src_path="/var/log/$app" diff --git a/scripts/change_url b/scripts/change_url index 554f7c4..3606d8d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -48,7 +48,7 @@ then # Change hostname for activity notifications exec_occ config:system:set overwrite.cli.url --value="https://${new_domain}${new_path}" - # Reload php fpm, necessary for force nextcloud to re-read config.php, cf opcache.revalidate_freq + # Reload PHP-FPM, necessary for force Nextcloud to re-read config.php, cf opcache.revalidate_freq ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload fi