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:
parent
d80f335f9d
commit
e526f969a9
1 changed files with 9 additions and 8 deletions
|
@ -24,6 +24,15 @@ logs_path="/var/log/$app"
|
|||
|
||||
#=================================================
|
||||
# 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
|
||||
#=================================================
|
||||
|
@ -40,14 +49,6 @@ if [ -f "/etc/supervisor/conf.d/${app}.conf" ]; then
|
|||
sudo ynh_secure_remove --file="/etc/supervisor/conf.d/${app}.conf"
|
||||
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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue