diff --git a/scripts/remove b/scripts/remove index 1b12a17..61f2713 100644 --- a/scripts/remove +++ b/scripts/remove @@ -73,6 +73,12 @@ ynh_script_progression --message="Removing app data directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="/home/yunohost.app/$app" +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --time --weight=1 + ynh_secure_remove --file="$datadir" +fi #================================================= # REMOVE THE CRON FILE #=================================================