From f9bf575034461f0f4cc51b47d04f169aa43b7213 Mon Sep 17 00:00:00 2001 From: Tobias Ollive Date: Tue, 28 Dec 2021 15:14:19 +0100 Subject: [PATCH] change systemd verification --- scripts/upgrade | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b4d6c7d..af39965 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,9 @@ port=$(ynh_app_setting_get --app=$app --key=port) if [ $(ynh_compare_current_package_version --comparison gt --version "0.2.0~ynh1") ] then redis_port=$(ynh_app_setting_get --app=$app --key=redis_port) +else + redis_port=$(ynh_find_port --port=8081) + ynh_app_setting_set --app=$app --key=redis_port --value=$redis_port fi #================================================= @@ -125,17 +128,11 @@ fi # REDIS CONFIGURATION #================================================= -if [ $(ynh_compare_current_package_version --comparison lt --version "0.2.0~ynh2") ] -then -# Find an available port for redis - redis_port=$(ynh_find_port --port=8081) - ynh_app_setting_set --app=$app --key=redis_port --value=$redis_port -fi ynh_add_config --template="redis.conf" --destination="$final_path/redis.conf" -redis_service="redis-$app$" -ynh_add_systemd_config --service $redis_service --template scrumblr_redis +redis_service="redis-$app" +ynh_add_systemd_config --service $redis_service --template "scrumblr_redis.service" chmod 750 "$final_path" chmod -R o-rwx "$final_path" @@ -186,7 +183,7 @@ yunohost service add $app --description="Software for notes" --log="/var/log/$ap #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at port" +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Server running at" #================================================= # RELOAD NGINX