diff --git a/scripts/change_url b/scripts/change_url index 6b15eea..5f4466a 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -14,14 +14,14 @@ source /usr/share/yunohost/helpers #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 +ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 ynh_change_url_nginx_config @@ -31,18 +31,16 @@ ynh_change_url_nginx_config # UPDATE CONFIGURATION FILE #================================================= -ynh_exec_warn_less 'ynh_add_config --template="config.xml" --destination="$data_dir/config.xml"' - -chmod 750 "$data_dir/config.xml" -chmod o-rwx "$data_dir/config.xml" -chown $app "$data_dir/config.xml" +ynh_add_config --template="config.xml" --destination="$data_dir/config.xml" +chmod 400 "$data_dir/config.xml" +chown $app:$app "$data_dir/config.xml" #================================================= # GENERIC FINALISATION #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 +ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="CommandExecutor: Starting" @@ -50,4 +48,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --time --last +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/restore b/scripts/restore index f9efb6e..3fb68bd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -21,9 +21,9 @@ chmod -R o-rwx "$install_dir" chown -R $app: "$install_dir" #================================================= -# RESTORE THE APP DATA DIR +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring the app data directory..." --weight=2 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 48c40f4..efe314d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,7 +36,6 @@ then ynh_setup_source --dest_dir="$install_dir" fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app: "$install_dir"