#!/bin/bash set -e # Retrieve arguments domain=$(sudo yunohost app setting shellinabox domain) path=$(sudo yunohost app setting shellinabox path) # Stop and remove shellinabox sudo service shellinabox stop || echo "ShellInABox already stopped" sudo apt-get remove --purge -y -qq shellinabox || echo "ShellInABox already uninstalled" # Remove Shell In A Box configuration sudo rm -f /etc/default/shellinabox # Remove service sudo yunohost service remove shellinabox # Remove Nginx proxy configuration sudo rm -f /etc/nginx/conf.d/$domain.d/shellinabox.conf sudo service nginx reload