diff --git a/scripts/backup b/scripts/backup index c6328ea..73c7292 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index 5d34885..bbc0228 100755 --- a/scripts/install +++ b/scripts/install @@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -# Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" @@ -29,19 +28,16 @@ chmod +x "$install_dir/hbbs" #================================================= ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 -# Create a dedicated systemd config ynh_add_systemd_config --service=rustdeskrelay --template=rustdeskrelay.service ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.service yunohost service add rustdeskrelay --description="Rustdesk Relay Server" --log="/var/log/$app/$app.log" yunohost service add rustdesksignal --description="Rustdesk Signal Server" --log="/var/log/$app/$app.log" -# Create log directory mkdir -p /var/log/$app touch /var/log/$app/$app.log chown $app -R /var/log/$app -# Use logrotate to manage application logfile(s) ynh_use_logrotate #================================================= @@ -51,7 +47,6 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -# Start a systemd service ynh_systemd_action --service_name=rustdeskrelay --action="start" --log_path="systemd" ynh_systemd_action --service_name=rustdesksignal --action="start" --log_path="systemd" diff --git a/scripts/remove b/scripts/remove index fd3aa96..1322199 100755 --- a/scripts/remove +++ b/scripts/remove @@ -16,7 +16,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 -# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status rustdeskrelay >/dev/null then ynh_script_progression --message="Removing rustdeskrelay service integration..." --weight=1 @@ -31,10 +30,8 @@ fi ynh_remove_systemd_config --service=rustdeskrelay ynh_remove_systemd_config --service=rustdesksignal -# Remove the app-specific logrotate config ynh_remove_logrotate -# Remove the log files ynh_secure_remove --file="/var/log/$app" #================================================= diff --git a/scripts/restore b/scripts/restore index 1c1c682..0587894 100755 --- a/scripts/restore +++ b/scripts/restore @@ -35,7 +35,6 @@ systemctl enable rustdeskrelay.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/rustdesksignal.service" systemctl enable rustdesksignal.service --quiet -# Create log directory mkdir -p /var/log/$app touch /var/log/$app/$app.log chown $app -R /var/log/$app @@ -52,7 +51,6 @@ yunohost service add rustdesksignal --description="Rustdesk Signal Server" --log #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -# Typically you only have either $app but not both at the same time... ynh_systemd_action --service_name=rustdeskrelay --action="start" --log_path="systemd" ynh_systemd_action --service_name=rustdesksignal --action="start" --log_path="systemd" diff --git a/scripts/upgrade b/scripts/upgrade index 3b84065..ba7e791 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,7 +29,6 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 - # Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir" --keep="id_ed25519.pub id_ed25519" fi