From c555863d7a9c6cdc32a1fc209a004e4fd4aecc1a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 17 Jan 2016 21:29:44 -0500 Subject: [PATCH] Remove invalid service directory during command runs Refs dokku/dokku-mariadb#30 --- commands | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands b/commands index a3fa85e..2e05d66 100755 --- a/commands +++ b/commands @@ -15,6 +15,10 @@ if [[ $1 == $PLUGIN_COMMAND_PREFIX:* ]]; then fi fi +if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then + rm -rf "$PLUGIN_DATA_ROOT/*" +fi + case "$1" in $PLUGIN_COMMAND_PREFIX:create) [[ -z $2 ]] && dokku_log_fail "Please specify a name for the service"