2019-04-11 11:17:42 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
2020-12-24 23:36:49 +01:00
|
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
2019-04-11 11:17:42 +02:00
|
|
|
#=================================================
|
|
|
|
|
2020-12-25 14:39:16 +01:00
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
2020-12-24 23:36:49 +01:00
|
|
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
2019-04-11 11:17:42 +02:00
|
|
|
then
|
2020-12-24 23:46:27 +01:00
|
|
|
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
2019-04-11 11:17:42 +02:00
|
|
|
yunohost service remove $app
|
|
|
|
fi
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STOP AND REMOVE SERVICE
|
|
|
|
#=================================================
|
2020-12-24 23:46:27 +01:00
|
|
|
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2
|
2019-04-11 11:17:42 +02:00
|
|
|
|
|
|
|
# Remove the dedicated systemd config
|
|
|
|
ynh_remove_systemd_config
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-12-24 23:46:27 +01:00
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|