Add starbound server
This commit is contained in:
parent
e7102adec1
commit
cd92ec64c2
8 changed files with 253 additions and 6 deletions
pkgs/starbound
32
pkgs/starbound/launch-starbound.sh
Normal file
32
pkgs/starbound/launch-starbound.sh
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
if ! [[ -v STATE_DIRECTORY && -v CREDENTIALS_DIRECTORY ]]; then
|
||||
echo "Error: Runtime dir or credential not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update the server to the latest version
|
||||
echo "Updating/installing starbound"
|
||||
|
||||
mkdir -p "${STATE_DIRECTORY}/.steamcmd"
|
||||
steamcmd <<EOF
|
||||
force_install_dir $STATE_DIRECTORY
|
||||
login tlater $(cat "$CREDENTIALS_DIRECTORY/steam")
|
||||
app_update 211820
|
||||
quit
|
||||
EOF
|
||||
|
||||
echo "Updating config"
|
||||
if [ -f "$1" ]; then
|
||||
mkdir -p ./storage
|
||||
cp "$1" ./storage/starbound_server.config
|
||||
fi
|
||||
|
||||
echo "Running starbound server"
|
||||
patchelf --set-interpreter '@interpreter@' ./linux/starbound_server
|
||||
# Must be run from the directory that the binary is in (why do game
|
||||
# devs do this?)
|
||||
cd linux
|
||||
./starbound_server
|
Loading…
Add table
Add a link
Reference in a new issue