Skip to content

Instantly share code, notes, and snippets.

@Corben78
Created August 27, 2018 08:44
Show Gist options
  • Save Corben78/56b1e8aac11309e4cb13b75879cf82e0 to your computer and use it in GitHub Desktop.
Save Corben78/56b1e8aac11309e4cb13b75879cf82e0 to your computer and use it in GitHub Desktop.
bash script to start and stop a Windows Aliens vs. Predator (2010) dedicated server on Linux with wine
#!/bin/bash
# Installation:
# Laden des Windows Binaries unter Linux
#./steamcmd.sh +login user pass +force_install_dir /home/steam/avpds +@sSteamCmdForcePlatformType windows +app_update 34120 +quit
DISPLAY=${DISPLAY:-:1}
WINEPREFIX=/home/steam/wine/avpds
#DISPLAY=localhost:10.0
. /lib/lsb/init-functions
case $1 in
start)
/sbin/start-stop-daemon --start --pidfile xvfb.pid --make-pidfile --exec /usr/bin/Xvfb --background -- :1
DISPLAY=$DISPLAY WINEPREFIX=$WINEPREFIX /sbin/start-stop-daemon --start --pidfile avp.pid --make-pidfile --chdir $WINEPREFIX/drive_c/avpds --exec /usr/bin/wine --background -- 'C:\avpds\AvP_CLI.exe'
;;
stop)
/sbin/start-stop-daemon --stop --quiet --retry=TERM/1/KILL/5 --pidfile avp.pid --name AvP_CLI.exe
/sbin/start-stop-daemon --stop --quiet --retry=TERM/1/KILL/5 --pidfile xvfb.pid --name Xvfb
;;
status)
status_of_proc -p xvfb.pid /usr/bin/Xvfb xvfb
status_of_proc -p avp.pid /usr/bin/wine avpds
;;
esac
@Xechorizo
Copy link

Xechorizo commented Jan 13, 2023

I know this is almost 5 years old, but does this happen to be part of a larger guide? Specifically, Steam connection failure, EResult = 3 occurs and I'm unsure whether SteamCMD through Wine is supposed to authenticate the server app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment