mirror of
https://github.com/YunoHost-Apps/searx_ynh.git
synced 2024-09-03 20:16:30 +02:00
a12c4b6e92
- Add a license file - Uses last helpers - Nginx configuration on one file for subpath and root - Upgrade 0.11 - Script restore fixed - Global refactoring
74 lines
2.1 KiB
Bash
74 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
|
|
#=================================================
|
|
|
|
# Suppression de la configuration uwsgi
|
|
sudo systemctl stop uwsgi
|
|
if [ -h "/etc/uwsgi/apps-enabled/$app.ini" ]; then
|
|
echo "Delete uwsgi config"
|
|
ynh_secure_remove "/etc/uwsgi/apps-enabled/$app.ini"
|
|
fi
|
|
ynh_secure_remove "/etc/uwsgi/apps-available/$app.ini"
|
|
|
|
#=================================================
|
|
# REMOVE DEPENDENCIES
|
|
#=================================================
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
#=================================================
|
|
# REMOVE THE MAIN DIR OF THE APP
|
|
#=================================================
|
|
|
|
ynh_secure_remove "/opt/yunohost/$app"
|
|
|
|
#=================================================
|
|
# REMOVE THE NGINX CONFIGURATION
|
|
#=================================================
|
|
|
|
ynh_remove_nginx_config # Suppression de la configuration nginx
|
|
|
|
#=================================================
|
|
# DISABLE SERVICE IN ADMIN PANEL
|
|
#=================================================
|
|
|
|
if [ -e /etc/init.d/uwsgi ]
|
|
then
|
|
# Redémarre le service uwsgi si il n'est pas désinstallé.
|
|
sudo systemctl start uwsgi
|
|
else
|
|
if sudo yunohost service status | grep -q uwsgi # Test l'existence du service dans Yunohost
|
|
then
|
|
echo "Remove uwsgi service"
|
|
sudo yunohost service remove uwsgi
|
|
fi
|
|
fi
|
|
|
|
#=================================================
|
|
# GENERIC FINALISATION
|
|
#=================================================
|
|
# REMOVE DEDICATED USER
|
|
#=================================================
|
|
|
|
ynh_system_user_delete $app
|