Remove invalid service directory during command runs

Refs dokku/dokku-mariadb#30
This commit is contained in:
Jose Diaz-Gonzalez
2016-01-17 21:29:51 -05:00
parent 0e4a607d63
commit 21cb6dbc9d

View File

@@ -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"