From b0efaebdbe5f9bd4406d0cb041161bbd9052ad71 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 17 Jan 2016 21:29:19 -0500 Subject: [PATCH] Remove invalid service directory during command runs Closes dokku/dokku-mongo#40 --- commands | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands b/commands index 6617707..1051ffe 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"