mirror of
https://github.com/YunoHost-Apps/ffsync_ynh.git
synced 2024-09-03 18:26:38 +02:00
Do not name services something.service ...
This commit is contained in:
parent
3a85d16ec4
commit
b6f62df85a
4 changed files with 15 additions and 6 deletions
|
@ -134,7 +134,7 @@ set_permissions
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Integrating service in YunoHost..."
|
ynh_print_info --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add "uwsgi-app@$app.service" --log "/var/log/uwsgi/app/$app"
|
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/app/$app"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -29,10 +29,10 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
|
# 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
|
if ynh_exec_warn_less yunohost service status uwsgi-app@$app >/dev/null
|
||||||
then
|
then
|
||||||
ynh_print_info --message="Removing $app service..."
|
ynh_print_info --message="Removing $app service..."
|
||||||
yunohost service remove uwsgi-app@$app.service
|
yunohost service remove uwsgi-app@$app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -81,12 +81,12 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
yunohost service add "uwsgi-app@$app.service" --log "/var/log/uwsgi/app/$app"
|
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/app/$app"
|
||||||
|
|
||||||
ynh_script_progression --message="Reloading services..." --weight=3
|
ynh_script_progression --message="Reloading services..." --weight=3
|
||||||
|
|
||||||
ynh_check_global_uwsgi_config
|
ynh_check_global_uwsgi_config
|
||||||
systemctl enable "uwsgi-app@$app.service"
|
systemctl enable "uwsgi-app@$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
@ -94,7 +94,7 @@ systemctl enable "uwsgi-app@$app.service"
|
||||||
# RELOAD NGINX AND UWSGI
|
# RELOAD NGINX AND UWSGI
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
systemctl start "uwsgi-app@$app.service"
|
systemctl start "uwsgi-app@$app"
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
|
||||||
ynh_script_progression --message="Restoration completed for $app" --last
|
ynh_script_progression --message="Restoration completed for $app" --last
|
||||||
|
|
|
@ -68,6 +68,15 @@ if [ -e /etc/init.d/ffsync ]; then
|
||||||
yunohost service remove "$app"
|
yunohost service remove "$app"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Remove old service ending with ".service"
|
||||||
|
if ynh_exec_warn_less yunohost service status "uwsgi-app@$app.service" >/dev/null
|
||||||
|
then
|
||||||
|
yunohost service remove uwsgi-app@$app.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/app/$app"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue