From b074d8e8b0c7fa5803ef51a6553d63ecd92dba5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 23 Nov 2020 23:39:34 +0100 Subject: [PATCH] Fix linter warning (#17) * Fix linter warning * Update upgrade --- check_process | 9 --------- scripts/install | 2 +- scripts/remove | 11 +++++++++++ scripts/upgrade | 9 ++++++++- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/check_process b/check_process index 7f063a2..b57d1c3 100644 --- a/check_process +++ b/check_process @@ -26,16 +26,7 @@ port_already_use=1 change_url=0 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=auto Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 ;;; Options Email= Notification=none diff --git a/scripts/install b/scripts/install index d0f918a..7b853e7 100644 --- a/scripts/install +++ b/scripts/install @@ -120,7 +120,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" --target_file=../conf/php-fpm.conf -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index 58eebf1..6fd9394 100644 --- a/scripts/remove +++ b/scripts/remove @@ -24,6 +24,17 @@ db_user=$db_name #================================================= # STANDARD REMOVE +#================================================= +# REMOVE SERVICE INTEGRATION IN YUNOHOST +#================================================= + +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) +if ynh_exec_warn_less yunohost service status $app >/dev/null +then + ynh_script_progression --message="Removing $app service integration..." --weight=1 + yunohost service remove $app +fi + #================================================= # STOP AND REMOVE SERVICE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index cabf4bc..0001056 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,7 +132,7 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$timezone" --target_file=../conf/php-fpm.conf -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) #================================================= @@ -142,6 +142,13 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) chown -R $app:www-data $final_path chown -R $app $final_path/src/Movim/Bootstrap.php +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add $app --description "Responsive web-based XMPP client" --log="/var/log/$app/$app.log" + #================================================= # Install PHP dependencies using composer #=================================================