Nimdy / Dedicated_Valheim_Server_Script

Valheim Server Manager . Supports: ValheimPlus, Bepinex, Multi-world, Multi-Lang, Update, Backup, Restore and more: Built for Linux
GNU Affero General Public License v3.0
697 stars 120 forks source link

[FEATURE] Ability to specify different Valheim Plus forks #307

Closed miadadrashid closed 2 months ago

miadadrashid commented 11 months ago

Is your feature request related to a problem? Please describe. Yes. The current valheim plus version is broken. Grantapher has provided updates to valheim plus that works with the current version client side but this server script is still pointing to the old repo with broken files. I tried to modify the install_valheim_plus function with the new URLs but with no avail. Here is what I have so far in the script...

function install_valheim_plus() {
    clear
    echo ""
    if [ ! -f /usr/bin/unzip ]; then
    apt install unzip -y
    fi
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_CHANGING_DIR" ; tput setaf 9; 
    cd ${valheimInstallPath}/${worldname}
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_CHECKING_OLD_INSTALL" ; tput setaf 9; 
    [ -e UnixServer.zip ] && rm UnixServer.zip
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_DOWNLOADING_VALHEIM_PLUS_FROM_REPO" ; tput setaf 9; 
    curl -s https://api.github.com/repos/Grantapher/valheimPlus/releases/latest \
    | grep "browser_download_url.*UnixServerRenamed\.zip" \
    | cut -d ":" -f 2,3 | tr -d \" \
    | wget -P ${valheimInstallPath}/${worldname} -qi - 
    echo ""
    sleep 1
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_CREATING_VER_STAMP" ; tput setaf 9; 
    curl -sL https://api.github.com/repos/Grantapher/valheimPlus/releases/latest | grep '"tag_name":' | cut -d'"' -f4 > localValheimPlusVersion
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_UNPACKING_FILES" ; tput setaf 9; 
    unzip -o UnixServer.zip
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_REMOVING_OLD_BEPINEX_CONFIG" ; tput setaf 9; 
    [ ! -e start_game_bepinex.sh ] && rm start_game_bepinex.sh
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_BUILDING_NEW_BEPINEX_CONFIG" ; tput setaf 9; 
    build_start_server_bepinex_configuration_file
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_SETTING_STEAM_OWNERSHIP" ; tput setaf 9; 
    chown steam:steam -Rf /home/steam/*
    chmod +x start_server_bepinex.sh
    rm UnixServer.zip
    echo ""
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_GET_THEIR_VIKING_ON" ; tput setaf 9; 
    tput setaf 2; echo "$FUNCTION_VALHEIM_PLUS_INSTALL_LETS_GO" ; tput setaf 9; 
}

Describe the solution you'd like Either we have an option to choose repos or that we update the njordmenu.sh with the new repo location for https://github.com/Grantapher/ValheimPlus/tree/0.9.10.0

Describe alternatives you've considered I've tried to modify the script myself but I'm not well versed in shell scripting otherwise I would have put out a pull request myself

sergey-jr commented 6 months ago

i think its goo idea

Nimdy commented 2 months ago

updated :)