"description":"Subnautica is an open world survival action-adventure video game developed and published by Unknown Worlds Entertainment. In it, players are free to explore the ocean on an alien planet, known as planet 4546B, after their spaceship, the Aurora, crashes on the planet's surface.\r\n\r\nNote: NitroxMod version >=1.5.0.0 is required",
"script":"#!\/bin\/bash\r\n# Installation Script\r\n#\r\n# Install dependencies\r\ndpkg --add-architecture i386\r\napt update\r\napt -y --no-install-recommends install curl unzip libstdc++6 lib32gcc1 ca-certificates libsdl2-2.0-0:i386\r\n\r\n## Get latest Nitrox-Mod build\r\nlatest_NitroxMod=$(curl --silent \"https:\/\/api.github.com\/repos\/SubnauticaNitrox\/Nitrox\/releases\/latest\" | grep '\"tag_name\":' | sed -E 's\/.*\"([^\"]+)\".*\/\\1\/')\r\n\r\nif [ -z \"${NITROX_VERSION}\" ] || [ \"${NITROX_VERSION}\" == \"latest\" ]; then\r\n DL_VERSION=$latest_NitroxMod\r\nelse\r\n DL_VERSION=${NITROX_VERSION}\r\nfi\r\n\r\n\r\n## download and install steamcmd\r\ncd \/tmp\r\nmkdir -p \/mnt\/server\/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steamcmd\r\ncd \/mnt\/server\/steamcmd\r\n\r\nchown -R root:root \/mnt\r\nexport HOME=\/mnt\/server\r\n\r\n\r\n## Install game using steamcmd\r\nGUARDCODE=\"${STEAM_GUARDCODE}\"\r\nif [ -z $GUARDCODE ]\r\nthen\r\n echo \"\"\r\n echo \"### You did not specify a Steam Guardcode\"\r\n echo \"### A new one should be send to you shortly\"\r\n echo \"### Enter it in the startup-config after this installation is finished and reinstall the Server\"\r\n sleep 10\r\n timeout 60 .\/steamcmd.sh +login ${STEAM_USERNAME} ${STEAM_PASSWORD} +quit\r\n exit 1\r\nfi\r\n\r\n[ ! -d \"$HOME\/subnautica\" ] && mkdir $HOME\/subnautica\r\n.\/steamcmd.sh +set_steam_guard_code ${STEAM_GUARDCODE} +login ${STEAM_USERNAME} ${STEAM_PASSWORD} +@sSteamCmdForcePlatformType windows +force_install_dir $HOME\/subnautica +app_update ${APPID} ${EXTRA_FLAGS} validate +quit\r\nstatus=$?\r\n\r\nif [ $status -ne 0 ]\r\nthen\r\n echo \"\"\r\n echo \"### The Download was not successful\"\r\n echo \"### Probably the entered Guardcode was wrong\"\r\n echo \"### A new one should be send to you shortly\"\r\n echo \"### Enter it in the startup-config after this installation is finished and reinstall the Server\"\r\n sleep 10\r\n sleep 10\r\n timeout 30 .\/steamcmd.sh +login ${STEAM_USERNAME} ${STEAM_PASSWORD} +quit\r\n exit 1\r\nfi\r\n\r\n\r\n## set up 32 bit libraries\r\nmkdir -p $HOME\/.steam\/sdk32\r\ncp -v linux32\/steamclient.so ..\/.steam\/sdk32\/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p $HOME\/.steam\/sdk64\r\ncp -v linux64\/steamclient.so ..\/.steam\/sdk64\/steamclient.so\r\n\r\n\r\n## Download and extract Nitrox\r\n[ -d \"$HOME\/nitrox\" ] && rm -r $HOME\/nitrox\r\nmkdir $HOME\/nitrox\r\ncd $HOME\/nitrox\r\ncurl -sL https:\/\/github.com\/SubnauticaNitrox\/Nitrox\/releases\/download\/${DL_VERSION}\/Nitrox.${DL_VERSION}.zip -o Nitrox.${DL_VERSION}.zip\r\nunzip $HOME\/nitrox\/Nitrox.${DL_VERSION}.zip\r\n\r\n\r\n## Create path files to Subnautica Install-Dir\r\necho \"\/home\/container\/subnautica\" > $HOME\/path.txt\r\n\r\n\r\n## Create config\r\nif [ -e $HOME\/server.cfg ]; then\r\n echo \"server settings exists\"\r\nelse\r\n echo \"writing server default settings\"\r\ncat<<EOT>$HOME\/server.cfg\r\n#Serversettingscanbechangedhere\r\n#Leaveblankforarandomspawnposition\r\nSeed=\r\nServerPort=11000\r\n#Measuredinmilliseconds\r\nSaveInterval=120000\r\n#Commandtorunfollowingasuccessfulworldsave(e.g..exe,.bat,orPowerShellscript).\r\nPostSaveCommandPath=\r\nMaxConnections=100\r\nDisableConsole=False\r\nDisableAutoSave=False\r\nSaveName=world\r\nServerPassword=\r\nAdminPassword=PleaseChangeMe\r\n#Possiblevalues:SURVIVAL,FREEDOM,HARDCORE,CREATIVE\r\nGameMode=SURVIVAL\r\n#Possiblevalues:PROTOBUF,JSON\r\nSerializerMode=JSON\r\n#Possiblevalues:NONE,PLAYER,MODERATOR,ADMIN,CONSOLE\r\nDefaultPlayerPerm=PLAYER\r\n#\r\n#Defaultplayerstatsbelowhere\r\nDefaultOxygenValue=45\r\nDefaultMaxOxygenValue=45\r\nDefaultHealthValue=80\r\nDefaultHungerValue=50.5\r\nDefaultThirstValue=90.5\r