From d052a8f76a9bdfb72d0134b6442fc9047e07959c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 19:22:23 +0100 Subject: [PATCH] cleaning --- scripts/change_url | 8 ++++---- scripts/install | 8 ++++---- scripts/restore | 4 ++-- scripts/upgrade | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 31da587..e4a574c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,8 +16,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=rustdesk-server --action="stop" --log_path="/var/log/$app/$app.log" -ynh_systemd_action --service_name=rustdesk-hbbs --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=rustdesk-server --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=rustdesk-hbbs --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -33,8 +33,8 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="/var/log/$app/$app.log" -ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="systemd" +ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index f761a70..e641d3a 100755 --- a/scripts/install +++ b/scripts/install @@ -35,8 +35,8 @@ ynh_add_nginx_config ynh_add_systemd_config --service=rustdesk-server --template=rustdesk-server.service ynh_add_systemd_config --service=rustdesk-hbbs --template=rustdesk-hbbs.service -yunohost service add rustdesk-server --description="A short description of the app" --log="/var/log/$app/$app.log" -yunohost service add rustdesk-hbbs --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add rustdesk-server --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" +yunohost service add rustdesk-hbbs --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" #================================================= # APP INITIAL CONFIGURATION @@ -58,8 +58,8 @@ yunohost service add rustdesk-hbbs --description="A short description of the app ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="/var/log/$app/$app.log" -ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="systemd" +ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 55ee0f9..a3aa7b5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -31,7 +31,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="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" #================================================= # GENERIC FINALIZATION @@ -41,7 +41,7 @@ yunohost service add $app --description="A short description of the app" --log=" ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 # Typically you only have either $app or php-fpm but not both at the same time... -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +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 6dcf901..d957864 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,26 +43,26 @@ ynh_add_nginx_config ynh_add_systemd_config -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 +#ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" +#ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" -chmod 400 "$install_dir/some_config_file" -chown $app:$app "$install_dir/some_config_file" +#chmod 400 "$install_dir/some_config_file" +#chown $app:$app "$install_dir/some_config_file" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT