diff --git a/scripts/remove b/scripts/remove index 5735a7f..fd7130c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -19,16 +19,23 @@ sudo pip uninstall -y mopidy_musicbox_webclient sleep 4 # Delete stupid file -# SECURE_REMOVE '/root/.config/mopidy' -# SECURE_REMOVE '/root/.cache/mopidy' -# SECURE_REMOVE '/root/.local/share/mopidy' -SECURE_REMOVE '/usr/local/bin/mopidy' -SECURE_REMOVE '/usr/share/mopidy' -SECURE_REMOVE '/var/lib/mopidy' -SECURE_REMOVE '/etc/apt/sources.list.d/mopidy.list' -SECURE_REMOVE '/usr/local/lib/python2.7/dist-packages/Mopidy_MusicBox_Webclient-2.3.0-py2.7.egg' -SECURE_REMOVE '/tmp/mopidy-musicbox-webclient' +# Normally a root directory is delete with install app +if [ -d "/root/.config/$app" ]; then + SECURE_REMOVE '/root/.config/$app' +fi +if [ -d "/root/.cache/$app" ]; then + SECURE_REMOVE '/root/.cache/$app' +fi +if [ -d "/root/.local/share/$app" ]; then + SECURE_REMOVE '/root/.local/share/$app' +fi +SECURE_REMOVE '/usr/local/bin/$app' +SECURE_REMOVE '/usr/share/$app' +SECURE_REMOVE '/var/lib/$app' +SECURE_REMOVE '/etc/apt/sources.list.d/$app.list' +SECURE_REMOVE '/tmp/$app-musicbox-webclient' SECURE_REMOVE '/var/www/$app' +sudo rm -fr '/usr/local/lib/python2.7/dist-packages/Mopidy_MusicBox_Webclient-2.3.0-py2.7.egg' # disallow firewall port sudo yunohost firewall disallow TCP 6600