INNER CODE UNIT · Shell

LOCAL_KEEP_RESTORE_FILES

evertramos/nginx-proxy-automation · bin/fresh-start.sh:544

  LOCAL_KEEP_RESTORE_FILES=${1:-$KEEP_RESTORE_FILES}

  echoerror \
    "It seems something went wrong! \
    \nRunning '${FUNCNAME[0]} to try to UNDO all actions done by this script. \
    \nPlease make sure everything was put it back in place." false

  # If docker network was created
  if [[ "$ACTION_DOCKER_NETWORK_CREATED" == true ]]; then
    [[ "$SILENT" != true ]] && echowarning "[undo] Deleting created docker network '$DOCKER_NETWORK_NAME'."
    run_function docker_network_remove $DOCKER_NETWORK_NAME
    ACTION_DOCKER_NETWORK_CREATED=false
  fi

  # If docker-compose file was renamed (backup)
  if [[ "$ACTION_DOCKER_COMPOSE_FILE_RENAMED" == true ]]; then
    [[ "$SILENT" != true ]] && echowarning "[undo] Renaming docker-compose.yml file '$LOCAL_BACKUP_DOCKER_COMPOSE_FILE'."
    mv $LOCAL_BACKUP_DOCKER_COMPOSE_FILE "$SCRIPT_PATH/../docker-compose.yml"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…