diff --git a/scripts/remove b/scripts/remove index 4e1c915..83c2f40 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,10 @@ source /usr/share/yunohost/helpers domain=$(ynh_app_setting_get "$app" domain) # Remove sources -# Avoid removing important directory if $app is empty or equal to +# Avoid removing important directory if $app is empty or $src_path equal to # "/" "/var" "/var/www" "/opt" "/home" "/home/yunohost.app" src_path=/var/www/$app -if test -z "$src_path" || [ "/var/www /opt /home/yunohost.app" =~ $src_path ]; then +if test -z "$app" || [ "/var/www /opt /home/yunohost.app" =~ $src_path ]; then echo "Variable src_path seems incomplete, suppression of app directory cancelled." >&2 else sudo rm -rf $src_path