vinanrra / Docker-7DaysToDie

7 days to die server using LinuxGSM in Docker with backups, monitor, auto-installable mods and more
GNU General Public License v3.0
236 stars 47 forks source link

[BUG] Update status capture doesn't capture #136

Open irobot73 opened 2 years ago

irobot73 commented 2 years ago

Describe the bug MODE = 2, appears the

To Reproduce Steps to reproduce the behavior:

  1. Pull image
  2. MODE = 0
  3. Bring DOCKER up
  4. MODE = 2
  5. Bring DOCKER up
  6. Note error msg. during update attempt

/home/sdtdserver/scripts/server_update.sh: line 30: update_code: command not found

Expected behavior Script should grab the status code from an UPDATE attempt to display the correct status msg.

Screenshots

ddick@ubuntu:/nas/Data/steam$ docker-compose up 
Creating network "steam_default" with the default driver
Creating vinanrra_sdtdserver ... done
Attaching to vinanrra_sdtdserver
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         =======================================================================
vinanrra_sdtdserver    |         USER INFO:
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         UID: 1000
vinanrra_sdtdserver    |         GID: 1000
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         MORE INFO:
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         If you have permission problems remember to use same user UID and GID.
vinanrra_sdtdserver    |         Check it with id command
vinanrra_sdtdserver    |         If problem persist check:
vinanrra_sdtdserver    |         https://github.com/vinanrra/Docker-7DaysToDie/blob/master/README.md
vinanrra_sdtdserver    |         =======================================================================
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |  * Starting periodic command scheduler cron
vinanrra_sdtdserver    |    ...done.
vinanrra_sdtdserver    | [INFO] Activated automatic backup at 5AM
vinanrra_sdtdserver    | [INFO] Activated LinuxGSM server monitoring
vinanrra_sdtdserver exited with code 0
ddick@ubuntu:/nas/Data/steam$ docker-compose up 
Recreating vinanrra_sdtdserver ... done
Attaching to vinanrra_sdtdserver
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         =======================================================================
vinanrra_sdtdserver    |         USER INFO:
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         UID: 1000
vinanrra_sdtdserver    |         GID: 1000
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         MORE INFO:
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |         If you have permission problems remember to use same user UID and GID.
vinanrra_sdtdserver    |         Check it with id command
vinanrra_sdtdserver    |         If problem persist check:
vinanrra_sdtdserver    |         https://github.com/vinanrra/Docker-7DaysToDie/blob/master/README.md
vinanrra_sdtdserver    |         =======================================================================
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    |  * Starting periodic command scheduler cron
vinanrra_sdtdserver    |    ...done.
vinanrra_sdtdserver    | [INFO] Activated automatic backup at 5AM
vinanrra_sdtdserver    | [INFO] Activated LinuxGSM server monitoring
[  OK  ] Updating sdtdserver: Checking for update: SteamCMD
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    | No update available
vinanrra_sdtdserver    | * Local build: 9269710
vinanrra_sdtdserver    | * Remote build: 9269710
vinanrra_sdtdserver    | * Branch: public
vinanrra_sdtdserver    | https://steamdb.info/app/294420/
vinanrra_sdtdserver    | 
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
vinanrra_sdtdserver    | branch=""
vinanrra_sdtdserver    | [INFO] Version changed to stable
[  OK  ] Updating sdtdserver: Checking for update: SteamCMD
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    | No update available
vinanrra_sdtdserver    | * Local build: 9269710
vinanrra_sdtdserver    | * Remote build: 9269710
vinanrra_sdtdserver    | * Branch: public
vinanrra_sdtdserver    | https://steamdb.info/app/294420/
vinanrra_sdtdserver    | 
vinanrra_sdtdserver    | /home/sdtdserver/scripts/server_update.sh: line 30: update_code: command not found
vinanrra_sdtdserver    | [INFO] There was a problem updating the server to stable
vinanrra_sdtdserver    | [INFO] Installing mods after first start
vinanrra_sdtdserver    | [INFO] The server mods have been updated to latest version, if the server crash, check mod compatibilites
vinanrra_sdtdserver exited with code 0

Versions:

Docker/Docker-compose

---
version: "3"
services:
  vinanrra_sdtdserver:
    image: vinanrra/7dtd-server         # https://github.com/vinanrra/Docker-7DaysToDie
    container_name: vinanrra_sdtdserver
    environment:
      - ALLOC_FIXES=NO                  # Optional - Install Allocs Fixes
      - ALLOC_FIXES_UPDATE=NO           # Optional - Update Allocs Fixes, depending of your 7 days to die version, on server install
      - BACKUP=YES                      # Optional - Backup server at 5 AM
      - MONITOR=YES                     # Optional - Keeps server up if crash
      - PUID=1000
      - PGID=1000
      - START_MODE=3                    # REQUIRED - Change between START MODES
                                        #
                                        # Start Modes
                                        #
                                        # 0 Install server
                                        # 1 Start server
                                        # 2 Update server
                                        # 3 Update server and start, useful if you have already a 7 Days To Die server installed
                                        # 4 Backup server and STOP the container
                                        #
      - TEST_ALERT=YES                  # Test alerts at start of server
      - TimeZone=America/New_York
      - VERSION=stable                  # Change between 7 days to die versions
                                        #    'stable' or 'latest_experimental' or...
                                        #    https://steamdb.info/app/251570/depots/
    volumes:
      - /nas/Data/steam/7days2die/svr:/home/sdtdserver/serverfiles/                  # 7DaysToDie server config files.
      - /nas/Data/steam/7days2die/userData:/home/sdtdserver/.local/share/7DaysToDie/ # 7DaysToDie saves, where maps are store.
      - /nas/Data/steam/LGSM/Logs:/home/sdtdserver/log/                                      # 7DaysToDie server log files.
      - /nas/Data/steam/LGSM/Backup:/home/sdtdserver/lgsm/backup/                            # 7DaysToDie server backups files.
      - /nas/Data/steam/LGSM/Config:/home/sdtdserver/lgsm/config-lgsm/sdtdserver/            # LGSM config files.
      - /nas/Data/steam/Steam/logs:/home/sdtdserver/.local/share/Steam/logs
      #- /nas:/media
    ports:
      - 80:80/tcp                   # EAC/EOS (testing)
      - 443:443/tcp                 # EAC/EOS (testing)
      - 26900:26900/tcp             # PC
      - 26900-26905:26900-26905/udp # PC (added few 'extra' ports to CYA)
      - 27015-27050:27015-27050/udp # Valve (server registration)
                                    #    [added more ports via https://7dtd.illy.bz/wiki/Ports]
      #- 1935:1935/tcp               # Playstation
      #- 3478-3480:3478-3480/udp     # Playstation
      #- 3074:3074/tcp               # X-Box
      #- 3074:3076:3074:3076/udp     # X-Box
      #                              #    (all the above via https://portforward.com/7-days-to-die/)
      - 8083:8083/tcp               # OPTIONAL WEBADMIN  [NOTE:  match server's CFG file]
      - 8084:8084/tcp               # OPTIONAL TELNET    [NOTE:  match server's CFG file]
      - 8085:8085/tcp               # OPTIONAL WEBSERVER https://7dtd.illy.bz/wiki/Server%20fixes
      - 8087:8087/tcp               # OPTIONAL WEBSERVER https://github.com/dmustanger/7dtd-ServerTools
    restart: unless-stopped         # NEVER USE WITH START_MODE=0, 2 or 4
                                    #    "no"
                                    #    always
                                    #    on-failure
                                    #    unless-stopped
                                    # 
                                    # https://developer.valvesoftware.com/wiki/SteamCMD

Additional context Add any other context about the problem here.

vinanrra commented 2 years ago

I have reverted the change, I will check the code

vinanrra commented 2 years ago

When I have time, I will implement a proper update check system