diff --git a/scripts/restore b/scripts/restore index 60f8c4e..b0f524f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,7 +28,7 @@ ynh_script_progression --message="Restoring various files..." --weight=2 ynh_restore_file --origin_path="/var/lib/$app" chmod 600 "/var/lib/$app/navidrome.toml" -chown -R $app "/var/lib/$app" +chown -R $app:$app "/var/lib/$app" #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 18305a6..2494e54 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,9 +83,9 @@ chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config @@ -98,15 +98,13 @@ yunohost service add $app --description="Web-based music collection server and s #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." - -config_path="/var/lib/$app" +ynh_script_progression --message="Updating a configuration file..." --weight=2 # Uncomment when there is new options added upstream -ynh_add_config --template="navidrome.toml" --destination="$config_path/navidrome.toml" +ynh_add_config --template="navidrome.toml" --destination="/var/lib/$app/navidrome.toml" -chmod 600 "$config_path/navidrome.toml" -chown -R $app:$app "$config_path" +chmod 600 "/var/lib/$app/navidrome.toml" +chown -R $app:$app "/var/lib/$app" #================================================= # START SYSTEMD SERVICE