diff --git a/scripts/remove b/scripts/remove index 36ce240..e368923 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,6 +38,18 @@ ynh_secure_remove --file="/var/log/$app" # Remove the app-specific logrotate config ynh_remove_logrotate + +#================================================= +# 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 config ynh_script_progression --message="Removing nginx configuration..." ynh_remove_nginx_config