From 5f57eb6b464430e832494e7efa79791105e4d40f Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 22 Aug 2023 16:54:22 +0200 Subject: [PATCH] upgrade to v0.7.7 --- .manifest.toml.swp | Bin 0 -> 1024 bytes conf/appsettings.json.example | 3 ++- manifest.toml | 14 +++++++------- scripts/change_url | 8 ++++---- scripts/install | 10 +++++----- scripts/remove | 4 ++-- scripts/restore | 8 ++++---- scripts/upgrade | 12 ++++++------ 8 files changed, 30 insertions(+), 29 deletions(-) create mode 100644 .manifest.toml.swp diff --git a/.manifest.toml.swp b/.manifest.toml.swp new file mode 100644 index 0000000000000000000000000000000000000000..1af9b14b3cc1654fc460ccbbe65f395237a36702 GIT binary patch literal 1024 zcmYc?$V<%2S1{ExVL$/dev/null +if ynh_exec_warn_less yunohost service status "$app" >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=1 - yunohost service remove $app + yunohost service remove "$app" fi # Remove the dedicated systemd config diff --git a/scripts/restore b/scripts/restore index 6d9970a..7a44c5a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,7 +19,7 @@ ynh_restore_file --origin_path="$install_dir" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app":www-data "$install_dir" #================================================= # RESTORE SYSTEM CONFIGURATIONS @@ -29,16 +29,16 @@ ynh_script_progression --message="Restoring system configurations related to $ap ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service --quiet +systemctl enable "$app".service --quiet -yunohost service add $app --description="Cross platform reading server" --log="/var/log/$app/$app.log" +yunohost service add "$app" --description="Cross platform reading server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 02663c1..3ee5675 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" +ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -37,8 +37,8 @@ then fi chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" -chmod +x $install_dir/Kavita +chown -R "$app":www-data "$install_dir" +chmod +x "$install_dir"/Kavita #================================================= # MODIFY A CONFIG FILE @@ -50,7 +50,7 @@ url_path=${path#/} ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json" chmod 600 "$install_dir/config/appsettings.json" -chown $app:$app "$install_dir/config/appsettings.json" +chown "$app":"$app" "$install_dir/config/appsettings.json" #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -66,14 +66,14 @@ ynh_add_systemd_config # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -yunohost service add $app --description="Cross platform reading server" --log="/var/log/$app/$app.log" +yunohost service add "$app" --description="Cross platform reading server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" #================================================= # END OF SCRIPT