From f76f14d51c111a5dc7766cbf77125d7352143579 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sun, 3 May 2020 14:30:28 +0200 Subject: [PATCH] Remove unwanted script --- scripts/install | 11 ++++++----- scripts/upgrade | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index dfafb9a..6b51a55 100755 --- a/scripts/install +++ b/scripts/install @@ -175,11 +175,12 @@ chown -R $app:$app /var/log/$app #================================================= ynh_script_progression --message="Setting up database and settings..." --weight=5 #we need to start and stop the service so that initial app.db file is created and that we can set default data -ynh_systemd_action - +ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" --log_path="$final_path/calibre-web.log" -t 20 #sleep required on low spec like raspberryPi -sleep 5s -ynh_systemd_action -a stop +sleep 2s +#remove unwanted calibre-web.log +ynh_secure_remove --file="$final_path/calibre-web.log" +ynh_systemd_action --service_name=$app --action="stop" #set database settings as per conf file @@ -233,7 +234,7 @@ fi #================================================= ynh_script_progression --message="Reload nginx and start $app..." --weight=5 ynh_systemd_action --service_name=nginx --action=reload -ynh_systemd_action --service_name=$app --action=start -l "server on :$port" -t 20 +ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" -t 20 #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 7febd32..998c92b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -175,7 +175,9 @@ else ynh_systemd_action --service_name=$app --action="start" --line_match="server on :$port" -t 20 fi #sleep required on low spec like raspberryPi -sleep 3s +sleep 2s +#remove unwanted calibre-web.log +ynh_secure_remove --file="$final_path/calibre-web.log" ynh_systemd_action --service_name=$app --action="stop" conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_settings))), $(. <(echo -E echo $(<../conf/init_calibre_db_ldap_settings))) WHERE ID=1\""