diff --git a/scripts/remove b/scripts/remove index 6235979..43d473a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -29,6 +29,16 @@ ynh_secure_remove --file="$final_path" # Remove the content directory securely #ynh_secure_remove --file="/home/yunohost.app/$app" +#================================================= +# REMOVE DATA DIR +#================================================= + +# 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 NGINX CONFIGURATION