From 534e77b5e8c2c50bea47f1c6bb7bcdde156a1b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:24:48 +0200 Subject: [PATCH] cleaning --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 6ba29ad..4e13a11 100644 --- a/scripts/install +++ b/scripts/install @@ -70,7 +70,7 @@ ynh_store_file_checksum --file="$config_file" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port +yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index ab1f38b..39e6631 100644 --- a/scripts/restore +++ b/scripts/restore @@ -41,7 +41,7 @@ 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 -yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port +yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 9142cb1..3cf7045 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,7 +33,7 @@ then ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" + ynh_setup_source --dest_dir="$install_dir" --keep=".config/syncthing/config.xml" fi chmod -R o-rwx "$install_dir" @@ -50,18 +50,18 @@ ynh_add_nginx_config #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." +#ynh_script_progression --message="Updating a configuration file..." -config_file="$install_dir/.config/syncthing/config.xml" +#config_file="$install_dir/.config/syncthing/config.xml" -ynh_backup_if_checksum_is_different --file="$config_file" +#ynh_backup_if_checksum_is_different --file="$config_file" # Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="$config_file" +#ynh_store_file_checksum --file="$config_file" #ynh_add_config --template="../conf/config.xml" --destination="$config_file" -chmod 400 "$config_file" -chown $app:$app "$config_file" +#chmod 400 "$config_file" +#chown $app:$app "$config_file" #================================================= # SETUP SYSTEMD @@ -78,7 +78,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port +yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port #================================================= # START SYSTEMD SERVICE