mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
77 lines
2.1 KiB
Bash
77 lines
2.1 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# STOP AND REMOVE SERVICE
|
|
#=================================================
|
|
|
|
if [ -e "/etc/systemd/system/$app.service" ]; then
|
|
echo "Delete systemd script"
|
|
sudo systemctl stop $app
|
|
sudo systemctl disable $app.service
|
|
sudo rm "/etc/systemd/system/$app.service"
|
|
fi
|
|
|
|
#=================================================
|
|
# DISABLE SERVICE IN ADMIN PANEL
|
|
#=================================================
|
|
|
|
if sudo yunohost service status | grep -q $app # Test l'existence du service dans Yunohost
|
|
then
|
|
echo "Remove $app service"
|
|
sudo yunohost service remove $app
|
|
fi
|
|
|
|
#=================================================
|
|
# REMOVE DEPENDENCIES
|
|
#=================================================
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
#=================================================
|
|
# REMOVE THE MAIN DIR OF THE APP
|
|
#=================================================
|
|
|
|
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
|
|
|
|
#=================================================
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
#=================================================
|
|
|
|
REMOVE_NGINX_CONF # Suppression de la configuration nginx
|
|
|
|
#=================================================
|
|
# REMOVE THE LOGROTATE CONFIG
|
|
#=================================================
|
|
|
|
ynh_remove_logrotate # Suppression de la configuration de logrotate
|
|
|
|
#=================================================
|
|
# SPECIFIC REMOVE
|
|
#=================================================
|
|
# REMOVE CRON JOBS
|
|
#=================================================
|
|
|
|
# Retirer le cron
|
|
if [ -e "/etc/cron.d/$app" ]; then
|
|
echo "Delete cron"
|
|
sudo rm "/etc/cron.d/$app"
|
|
fi
|