1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

scripts: remove the service before removing the systemd config

Yunohost complains if the systemd unit doesn't exist when removing
the service.
This commit is contained in:
Pierre de La Morinerie 2020-02-08 23:34:06 +01:00
parent d80f335f9d
commit e526f969a9

View file

@ -24,6 +24,15 @@ logs_path="/var/log/$app"
#================================================= #=================================================
# STANDARD REMOVE # STANDARD REMOVE
#=================================================
#=================================================
# REMOVE SERVICE FROM ADMIN PANEL
#=================================================
if sudo yunohost service status | grep -q "$app"; then
sudo yunohost service remove "$app"
fi
#================================================= #=================================================
# STOP AND REMOVE SERVICE # STOP AND REMOVE SERVICE
#================================================= #=================================================
@ -40,14 +49,6 @@ if [ -f "/etc/supervisor/conf.d/${app}.conf" ]; then
sudo ynh_secure_remove --file="/etc/supervisor/conf.d/${app}.conf" sudo ynh_secure_remove --file="/etc/supervisor/conf.d/${app}.conf"
fi fi
#=================================================
# REMOVE SERVICE FROM ADMIN PANEL
#=================================================
if sudo yunohost service status | grep -q "$app"; then
sudo yunohost service remove "$app"
fi
#================================================= #=================================================
# REMOVE THE MYSQL DATABASE # REMOVE THE MYSQL DATABASE
#================================================= #=================================================