diff --git a/panelctl.sh b/panelctl.sh index 14fe331..4619baf 100644 --- a/panelctl.sh +++ b/panelctl.sh @@ -276,7 +276,7 @@ cmd_render_route() { maybe_reload_caddy() { if [[ -x /run/current-system/sw/bin/caddy && -f /etc/caddy/Caddyfile ]]; then - /run/current-system/sw/bin/caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile + /run/current-system/sw/bin/caddy validate --config /etc/caddy/Caddyfile --adapter caddyfile || echo "warning: caddy validation failed" >&2 fi if [[ "${EUID}" -eq 0 ]]; then @@ -300,7 +300,7 @@ cmd_deploy() { load_app "${name}" cmd_render_route "${name}" - run_compose -f "${APP_COMPOSE_FILE}" up -d + run_compose -f "${APP_COMPOSE_FILE}" up -d || fail "compose up failed" maybe_reload_caddy echo "deployed app '${name}'" @@ -311,7 +311,7 @@ cmd_stop() { validate_name "${name}" load_app "${name}" - run_compose -f "${APP_COMPOSE_FILE}" down + run_compose -f "${APP_COMPOSE_FILE}" down || fail "compose down failed" echo "stopped app '${name}'" } @@ -321,7 +321,7 @@ cmd_remove() { validate_name "${name}" load_app "${name}" - run_compose -f "${APP_COMPOSE_FILE}" down || true + run_compose -f "${APP_COMPOSE_FILE}" down 2>/dev/null || true # Remove this app's block from the aggregate routes file. if [[ -f "${APP_ROUTE_FILE}" ]]; then