From 38aa8c0c1da39523a5062a74cff7dc4970acedf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 5 Jul 2022 22:21:15 +0200 Subject: [PATCH] Fix --- scripts/_common.sh | 2 +- scripts/change_url | 14 ++++++++++++++ scripts/install | 2 +- scripts/restore | 5 +++-- scripts/upgrade | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index a0a7a35..6fc3227 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.0" +YNH_PHP_VERSION="8.0" pkg_dependencies="postgresql php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml" diff --git a/scripts/change_url b/scripts/change_url index 7123876..e3b9bfc 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -66,6 +66,13 @@ fi #================================================= # STANDARD MODIFICATIONS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" + #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -107,6 +114,13 @@ ynh_add_config --template="../conf/config.php" --destination="$final_path/config chmod 400 "$final_path/config.php" chown $app "$final_path/config.php" +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." + +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/install b/scripts/install index fd0aea4..1e60b46 100644 --- a/scripts/install +++ b/scripts/install @@ -151,7 +151,7 @@ yunohost service add $app --description="News feed reader and aggregator" --log= ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 5522c61..e5164bf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,7 +37,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -113,7 +114,7 @@ yunohost service add $app --description="News feed reader and aggregator" --log= #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index d891e3b..260d894 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -175,7 +175,7 @@ yunohost service add $app --description="News feed reader and aggregator" --log= #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # RELOAD NGINX