diff --git a/README.md b/README.md index e90333c..6715e6f 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ To get a local copy up and running follow these simple example steps. ``` * Ubuntu Install ```sh - Ubuntu 20.04 LTS + Ubuntu 24.04 LTS ``` * Putty 64bit for Windows User ```sh @@ -144,7 +144,7 @@ To get a local copy up and running follow these simple example steps. 1. Verify GIT and Net Tools is installed = ```sh -sudo apt update && install git net-tools +sudo apt update && apt install git net-tools ``` 2. Change directory to OPT for installation script (Advance User do what you wish) = diff --git a/njordmenu.sh b/njordmenu.sh index 461888a..353c7a9 100644 --- a/njordmenu.sh +++ b/njordmenu.sh @@ -572,7 +572,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit ExecStart=${valheimInstallPath}/${worldname}/start_valheim_${worldname}.sh ExecReload=/bin/kill -s HUP \$MAINPID KillSignal=SIGINT @@ -657,15 +657,15 @@ function linux_server_update() { tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; sleep 1 - # Install additional packages + # Install additional packages (non-i386 first) tput setaf 1; echo "$INSTALL_ADDITIONAL_FILES"; tput setaf 9; if command -v apt-get >/dev/null; then - sudo apt install -y lib32gcc1 libsdl2-2.0-0 libsdl2-2.0-0:i386 git mlocate net-tools unzip curl isof + sudo apt install -y lib32gcc-s1 git plocate net-tools unzip curl lsof elif command -v yum >/dev/null; then if [[ "$ID" == "fedora" ]] || [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "8" ]]; then - sudo dnf install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl isof + sudo dnf install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl lsof elif [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "7" ]]; then - sudo yum install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl isof + sudo yum install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl lsof else echo "Unsupported version for yum/dnf." fi @@ -725,10 +725,10 @@ function linux_server_update() { tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; sleep 1 - # Update system again + # Update system and install i386 packages (after adding i386 architecture) tput setaf 1; echo "$CHECK_FOR_UPDATES_AGAIN"; tput setaf 9; if command -v apt-get >/dev/null; then - sudo apt update && sudo apt install -y libpulse-dev libatomic1 libc6 + sudo apt update && sudo apt install -y libpulse-dev libatomic1 libc6 libsdl2-2.0-0 libsdl2-2.0-0:i386 elif command -v yum >/dev/null; then if [[ "$ID" == "fedora" ]] || [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "8" ]]; then sudo dnf update -y @@ -754,7 +754,7 @@ function Install_steamcmd_client() { if command -v apt-get >/dev/null; then echo steam steam/license note '' | sudo debconf-set-selections echo steam steam/question select 'I AGREE' | sudo debconf-set-selections - sudo apt install -y steamcmd libsdl2-2.0-0 libsdl2-2.0-0:i386 + sudo apt install -y steamcmd tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; elif command -v yum >/dev/null; then if [[ "$ID" == "fedora" ]] || [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "8" ]]; then @@ -970,8 +970,8 @@ function nocheck_valheim_update_install() { tput setaf 1; echo "$INSTALL_BUILD_DOWNLOAD_INSTALL_STEAM_VALHEIM"; tput setaf 9; sleep 1 - # Execute the steamcmd command to install/update Valheim - $steamexe +login anonymous +force_install_dir "${valheimInstallPath}/${worldname}" +app_update 896660 validate +exit + # Execute the steamcmd command to install/update Valheim (as steam user) + sudo -u steam $steamexe +force_install_dir "${valheimInstallPath}/${worldname}" +login anonymous +app_update 896660 validate +exit tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; } @@ -998,7 +998,7 @@ $(ColorRed "$DRAW60")" # If 'y', then continue, else cancel if [ "$confirmOfficialUpdates" == "y" ]; then tput setaf 2; echo "$FUNCTION_INSTALL_VALHEIM_UPDATE_APPLY_INFO"; tput setaf 9; - $steamexe +login anonymous +force_install_dir "${valheimInstallPath}/${worldname}" +app_update 896660 validate +exit + sudo -u steam $steamexe +force_install_dir "${valheimInstallPath}/${worldname}" +login anonymous +app_update 896660 validate +exit chown -R steam:steam "${valheimInstallPath}/${worldname}" echo "" else @@ -2095,7 +2095,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit EOF if [ "$valheimVanilla" == "1" ]; then @@ -2533,7 +2533,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit EOF if [ "$valheimVanilla" == "1" ]; then @@ -2912,7 +2912,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit ExecStart=${valheimInstallPath}/${worldname}/start_valheim_${worldname}.sh ExecReload=/bin/kill -s HUP \$MAINPID KillSignal=SIGINT diff --git a/playground/njord.sh b/playground/njord.sh index c9809c7..dbb7113 100644 --- a/playground/njord.sh +++ b/playground/njord.sh @@ -255,7 +255,7 @@ check_for_valheim_updates() { # Function to apply updates apply_valheim_updates() { echo "Applying updates to Valheim server..." - if /home/steam/steamcmd +login anonymous +force_install_dir "${valheimInstallPath}" +app_update 896660 validate +quit; then + if /home/steam/steamcmd +force_install_dir "${valheimInstallPath}" +login anonymous +app_update 896660 validate +quit; then echo "Valheim server updated successfully." log_action "Valheim server updated to latest version." else diff --git a/playground/njordrebirth.sh b/playground/njordrebirth.sh index 7e7851c..add0f9b 100644 --- a/playground/njordrebirth.sh +++ b/playground/njordrebirth.sh @@ -481,7 +481,7 @@ EOF tput setaf 9 echo steam steam/question select "I AGREE" | sudo debconf-set-selections echo steam steam/license note '' | sudo debconf-set-selections - apt install steamcmd libsdl2-2.0-0 libsdl2-2.0-0:i386 -y + apt install steamcmd -y tput setaf 2 echo "Done" tput setaf 9 @@ -522,7 +522,7 @@ EOF echo "Downloading and installing Valheim from Steam" tput setaf 9 sleep 1 - /home/steam/steamcmd +login anonymous +force_install_dir ${valheimInstallPath} +app_update 896660 validate +exit + /home/steam/steamcmd +force_install_dir ${valheimInstallPath} +login anonymous +app_update 896660 validate +exit tput setaf 2 echo "Done" tput setaf 9 @@ -598,7 +598,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=/home/steam/steamcmd +login anonymous +force_install_dir ${valheimInstallPath} +app_update 896660 validate +exit +ExecStartPre=/home/steam/steamcmd +force_install_dir ${valheimInstallPath} +login anonymous +app_update 896660 validate +exit ExecStart=${valheimInstallPath}/start_valheim.sh ExecReload=/bin/kill -s HUP \$MAINPID KillSignal=SIGINT @@ -861,7 +861,7 @@ $(ColorRed '------------------------------------------------------------')" tput setaf 2 echo "Using Thor's Hammer to apply Official Updates!" tput setaf 9 - /home/steam/steamcmd +login anonymous +force_install_dir ${valheimInstallPath} +app_update 896660 validate +exit + /home/steam/steamcmd +force_install_dir ${valheimInstallPath} +login anonymous +app_update 896660 validate +exit chown -R steam:steam ${valheimInstallPath} echo "" else @@ -896,7 +896,7 @@ function check_apply_server_updates_beta() { echo "" echo "Downloading Official Valheim Repo Log Data for comparison only" [ ! -d /opt/valheimtemp ] && mkdir -p /opt/valheimtemp - /home/steam/steamcmd +login anonymous +force_install_dir /opt/valheimtemp +app_update 896660 validate +exit + /home/steam/steamcmd +force_install_dir /opt/valheimtemp +login anonymous +app_update 896660 validate +exit sed -e 's/[\t ]//g;/^$/d' /opt/valheimtemp/steamapps/appmanifest_896660.acf >appmanirepo.log repoValheim=$(sed -n '11p' appmanirepo.log) echo "Official Valheim-: $repoValheim" diff --git a/rebirth/lib/core.sh b/rebirth/lib/core.sh index 8777ed9..8368a78 100644 --- a/rebirth/lib/core.sh +++ b/rebirth/lib/core.sh @@ -143,7 +143,7 @@ function display_system_info() { # Display network information function display_network_info() { echo "" - sudo netstat -atunp | grep valheim + ss -atunp | grep valheim echo "" echo "Returning to menu in 5 Seconds" sleep 5 @@ -254,7 +254,7 @@ function validateUsedValheimPorts() { local port_in_use for (( i=$starting_port; i<=$ending_port; i++ )); do - port_in_use=$(sudo netstat -plnt | grep ":$i") + port_in_use=$(ss -plnt | grep ":$i") if [[ -z "$port_in_use" ]]; then echo "$i not in use, Recommend choosing this one" return diff --git a/rebirth/lib/server.sh b/rebirth/lib/server.sh index 45f1a19..95c5d8e 100644 --- a/rebirth/lib/server.sh +++ b/rebirth/lib/server.sh @@ -70,7 +70,7 @@ function Install_steamcmd_client() { if command -v apt-get >/dev/null; then echo steam steam/license note '' | sudo debconf-set-selections echo steam steam/question select 'I AGREE' | sudo debconf-set-selections - sudo apt install -y steamcmd libsdl2-2.0-0 libsdl2-2.0-0:i386 + sudo apt install -y steamcmd tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; elif command -v yum >/dev/null; then if [[ "$ID" == "fedora" ]] || [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "8" ]]; then @@ -175,15 +175,15 @@ function linux_server_update() { tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; sleep 1 - # Install additional packages + # Install additional packages (non-i386 first) tput setaf 1; echo "$INSTALL_ADDITIONAL_FILES"; tput setaf 9; if command -v apt-get >/dev/null; then - sudo apt install -y lib32gcc1 libsdl2-2.0-0 libsdl2-2.0-0:i386 git mlocate net-tools unzip curl isof + sudo apt install -y lib32gcc-s1 git plocate net-tools unzip curl lsof elif command -v yum >/dev/null; then if [[ "$ID" == "fedora" ]] || [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "8" ]]; then - sudo dnf install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl isof + sudo dnf install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl lsof elif [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "7" ]]; then - sudo yum install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl isof + sudo yum install -y glibc.i686 libstdc++.i686 git mlocate net-tools unzip curl lsof else echo "Unsupported version for yum/dnf." fi @@ -243,10 +243,10 @@ function linux_server_update() { tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; sleep 1 - # Update system again + # Update system and install i386 packages (after adding i386 architecture) tput setaf 1; echo "$CHECK_FOR_UPDATES_AGAIN"; tput setaf 9; if command -v apt-get >/dev/null; then - sudo apt update && sudo apt install -y libpulse-dev libatomic1 libc6 + sudo apt update && sudo apt install -y libpulse-dev libatomic1 libc6 libsdl2-2.0-0 libsdl2-2.0-0:i386 elif command -v yum >/dev/null; then if [[ "$ID" == "fedora" ]] || [[ "$ID" =~ ^(centos|ol|rhel)$ && "${VERSION:0:1}" == "8" ]]; then sudo dnf update -y @@ -267,8 +267,8 @@ function nocheck_valheim_update_install() { tput setaf 1; echo "$INSTALL_BUILD_DOWNLOAD_INSTALL_STEAM_VALHEIM"; tput setaf 9; sleep 1 - # Execute the steamcmd command to install/update Valheim - $steamexe +login anonymous +force_install_dir "${valheimInstallPath}/${worldname}" +app_update 896660 validate +exit + # Execute the steamcmd command to install/update Valheim (as steam user) + sudo -u steam $steamexe +force_install_dir "${valheimInstallPath}/${worldname}" +login anonymous +app_update 896660 validate +exit tput setaf 2; echo "$ECHO_DONE"; tput setaf 9; } @@ -568,7 +568,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit ExecStart=${valheimInstallPath}/${worldname}/start_valheim_${worldname}.sh ExecReload=/bin/kill -s HUP \$MAINPID KillSignal=SIGINT @@ -1033,7 +1033,7 @@ $(ColorRed "$DRAW60")" # If 'y', then continue, else cancel if [ "$confirmOfficialUpdates" == "y" ]; then tput setaf 2; echo "$FUNCTION_INSTALL_VALHEIM_UPDATE_APPLY_INFO"; tput setaf 9; - $steamexe +login anonymous +force_install_dir "${valheimInstallPath}/${worldname}" +app_update 896660 validate +exit + sudo -u steam $steamexe +force_install_dir "${valheimInstallPath}/${worldname}" +login anonymous +app_update 896660 validate +exit chown -R steam:steam "${valheimInstallPath}/${worldname}" echo "" else @@ -1212,7 +1212,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit ExecStart=${valheimInstallPath}/${worldname}/start_valheim_${worldname}.sh ExecReload=/bin/kill -s HUP \$MAINPID KillSignal=SIGINT diff --git a/rebirth/lib/update.sh b/rebirth/lib/update.sh index 48e1378..d3e043b 100644 --- a/rebirth/lib/update.sh +++ b/rebirth/lib/update.sh @@ -62,7 +62,7 @@ $(ColorRed "$DRAW60")" # If 'y', then continue, else cancel if [ "$confirmOfficialUpdates" == "y" ]; then tput setaf 2; echo "$FUNCTION_INSTALL_VALHEIM_UPDATE_APPLY_INFO"; tput setaf 9; - $steamexe +login anonymous +force_install_dir "${valheimInstallPath}/${worldname}" +app_update 896660 validate +exit + sudo -u steam $steamexe +force_install_dir "${valheimInstallPath}/${worldname}" +login anonymous +app_update 896660 validate +exit chown -R steam:steam "${valheimInstallPath}/${worldname}" echo "" else diff --git a/rebirth/mods/bepinex.sh b/rebirth/mods/bepinex.sh index 55eb064..794d1bf 100644 --- a/rebirth/mods/bepinex.sh +++ b/rebirth/mods/bepinex.sh @@ -197,7 +197,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit EOF if [ "$valheimVanilla" == "1" ]; then diff --git a/rebirth/mods/valheimplus.sh b/rebirth/mods/valheimplus.sh index 36c82e8..3e9ad9e 100644 --- a/rebirth/mods/valheimplus.sh +++ b/rebirth/mods/valheimplus.sh @@ -215,7 +215,7 @@ StartLimitInterval=60s StartLimitBurst=3 User=steam Group=steam -ExecStartPre=$steamexe +login anonymous +force_install_dir ${valheimInstallPath}/${worldname} +app_update 896660 validate +exit +ExecStartPre=$steamexe +force_install_dir ${valheimInstallPath}/${worldname} +login anonymous +app_update 896660 validate +exit EOF if [ "$valheimVanilla" == "1" ]; then