mirror of
https://github.com/YunoHost-Apps/scrumblr_ynh.git
synced 2024-09-03 20:16:29 +02:00
change systemd verification
This commit is contained in:
parent
6c57afcc11
commit
f9bf575034
1 changed files with 6 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue