fixed nixery
This commit is contained in:
parent
20f96e1368
commit
c76004c330
3 changed files with 50 additions and 2 deletions
|
|
@ -1 +1 @@
|
|||
./ArmaReforgerServer -config ./Configs/default.json -maxFPS 60
|
||||
export NIXPKGS_ALLOW_UNFREE=1 && nix-shell -p steam-run --run "steam-run ./ArmaReforgerServer -config ./Configs/default.json -maxFPS 60"
|
||||
|
|
|
|||
48
scripts/update.sh
Executable file
48
scripts/update.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
server_root_path="/home/speccon18/Documents/code/test/reforger"
|
||||
config_path="$server_root_path/Configs"
|
||||
start_script_path="$server_root_path/start.sh"
|
||||
steamcmd_script_path="./reforger_update"
|
||||
|
||||
# Step 1: Download updater script if missing
|
||||
if [ ! -f "$steamcmd_script_path" ]; then
|
||||
echo "Downloading reforger_update script..."
|
||||
curl -L -o "$steamcmd_script_path" "https://git.skdevstudios.com/SK-Development-Studios/Ground-Zero-Conflict-Configuration/raw/branch/main/scripts/reforger_update"
|
||||
chmod +x "$steamcmd_script_path"
|
||||
fi
|
||||
|
||||
# Step 2: Missing files — download, run steamcmd, move into root
|
||||
if [ ! -d "$config_path" ] || [ ! -f "$start_script_path" ]; then
|
||||
echo "Missing Configs/ or start.sh in server root."
|
||||
|
||||
# Download locally
|
||||
curl -L -o ./start.sh "https://git.skdevstudios.com/SK-Development-Studios/Ground-Zero-Conflict-Configuration/raw/branch/main/scripts/start.sh"
|
||||
chmod +x ./start.sh
|
||||
|
||||
mkdir -p ./Configs
|
||||
curl -L -o ./Configs/default.json "https://git.skdevstudios.com/SK-Development-Studios/Ground-Zero-Conflict-Configuration/raw/branch/main/Configs/default.json"
|
||||
|
||||
# Run steamcmd (creates root if needed)
|
||||
echo "Running steamcmd to initialize server files..."
|
||||
steamcmd +runscript "$(pwd)/reforger_update"
|
||||
|
||||
# Then move into root
|
||||
echo "Moving downloaded files into server root..."
|
||||
mv ./start.sh "$server_root_path/"
|
||||
mv ./Configs "$server_root_path/"
|
||||
|
||||
# Step 3: Files already exist — move out, update, move back in
|
||||
else
|
||||
echo "Found existing Configs/ and start.sh. Backing them up..."
|
||||
|
||||
mv "$start_script_path" ./start.sh
|
||||
mv "$config_path" ./Configs
|
||||
|
||||
steamcmd +runscript "$(pwd)/reforger_update"
|
||||
|
||||
mv ./start.sh "$server_root_path/"
|
||||
mv ./Configs "$server_root_path/"
|
||||
fi
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue