mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
feat: ensure we don't try to restore an app that wasn't deployed
This commit is contained in:
@@ -10,6 +10,11 @@ ps_restore_cmd() {
|
||||
local APP="$2"
|
||||
|
||||
if [[ -n "$APP" ]]; then
|
||||
if ! (is_deployed "$APP"); then
|
||||
dokku_log_warn "App $APP has not been deployed"
|
||||
return
|
||||
fi
|
||||
|
||||
DOKKU_APP_RESTORE="$(config_get "$APP" DOKKU_APP_RESTORE || true)"
|
||||
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
|
||||
ps_start "$APP" || dokku_log_warn "dokku ps:restore ${APP} failed"
|
||||
@@ -37,7 +42,7 @@ ps_restore_all() {
|
||||
for app in $(dokku_apps); do
|
||||
local DOKKU_APP_RESTORE=$(config_get "$app" DOKKU_APP_RESTORE || true)
|
||||
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
|
||||
echo "Restoring app $app ..."
|
||||
dokku_log_verbose "Restoring app $app ..."
|
||||
if ps_start "$app"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user