Ich will einen Insurgency Gameserver per service Befehl starten usw. Das Problem ist, das ich die start.sh problemos starten kann aber der service Befehl geht nicht. Wenn ich es per service starten will, kommt die meldung im Screen das die srcds_linux nicht gefunden werden konnte. Man sollte auch erwähnen, das ich kein Bash König bin. Das der Server erstmal über root läuft ist nebensächlich. Hier die Codes: Im /etc/init.d/insurgency
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #!/bin/sh ### BEGIN INIT INFO # Provides: Insurgency # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Insurgency Server ### END INIT INFO ###################################### # Customize values for your needs: "User"; "DIR" USER="root" DIR="/home/steam/steamapps/common/Insurgency\ Dedicated\ Server/" ###### Insurgency server start/stop script ###### case "$1" in start) su $USER -c "${DIR}/start.sh start" ;; stop) su $USER -c "${DIR}/start.sh stop" ;; restart) su $USER -c "${DIR}/start.sh restart" ;; status) su $USER -c "${DIR}/start.sh status" ;; *) echo "Usage: {start|stop|restart|status}" >&2 exit 1 ;; esac exit 0 |
Die start.sh
1 | screen -m -S ins ./srcds_linux -console +map ministry +maxplayers 24 -ip xxx.xx.xx.xx -port 27015 |