#!/bin/bash app="searx" # Source app helpers . /usr/share/yunohost/helpers # Retrieve arguments domain=$(ynh_app_setting_get "$app" domain) # Remove files sudo rm -Rf /opt/yunohost/$app sudo rm -f /etc/uwsgi/apps-enabled/$app.ini sudo rm -f /etc/uwsgi/apps-available/$app.ini sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf # Remove services sudo service uwsgi stop sudo killall uwsgi sudo service uwsgi start # Remove user if id -u searx > /dev/null 2>&1; then sudo userdel searx fi # Reload Nginx sudo service nginx reload