diff --git a/scripts/install b/scripts/install index 994506f..ddd675d 100644 --- a/scripts/install +++ b/scripts/install @@ -19,6 +19,12 @@ sudo yunohost app checkport $port if [[ ! $? -eq 0 ]]; then exit 1 fi + +#check if su_password is not empty +if [[ -n $su_passwd ]]; then + exit 1 +fi + # Save app settings sudo yunohost app setting $app port -v "$port" diff --git a/scripts/remove b/scripts/remove index 39124bb..3b78f74 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,11 @@ #!/bin/bash app=mumbleserver +#getting port used by mumble to close it port=$(sudo yunohost app setting $app port) +#uninstall mumble and its dependencies sudo apt-get autoremove -y mumble-server > /dev/null 2>&1 +#close ports sudo yunohost firewall disallow Both $port > /dev/null 2>&1 +#removing config file sudo rm -f /etc/mumble-server.ini \ No newline at end of file