Beiträge von -|T.O.B|-D3v1l
-
-
-
Hatt sich erledigt
es läuft jetzt -
Kann mir evtl. jemand das startscript anpassen?
habe nur nen Webmin zugriff!Orginal Config vom Server:
Code
Alles anzeigen#! /bin/bash # !!!!!!!!!!!!!! CHANGE THIS TO THE USER YOU USE FOR YOUR SERVER !!!!!!!!!!!!!!! COD4_USER=cod4srv1 PATH=/bin:/usr/bin:/sbin:/usr/sbin # # DON'T FORGET TO CHANGE THE PATH TO YOUR NEEDS! DIR=/home/cod4srv1 DAEMON=cod4_lnxded # Internet server: PARAMS="+set net_port 28960 +set sv_punkbuster 1 +set sv_pure 1 +exec server.cfg +set fs_homepath /home/cod4srv1/ +map_rotate" # +set fs_game mods/am4 NAME=cod4server DESC="COD4 SERVER #1 Train" # No edits (should be) necessary beyond this line if [ ! -x `which awk` ]; then echo "You need awk for this script"; exit 1; fi if [ ! -x `which screen` ]; then echo "You need screen for this script"; exit 1; fi if [ `whoami` = root ] then usagetype=root else usagetype=nonroot fi start() { if [ ! -d $DIR ]; then echo " ... No such directory: $DIR!"; exit 1; fi if [ ! -x $DIR/$DAEMON ]; then echo "$DIR/$DAEMON does not exist or is not executable!"; exit 1; fi if status; then echo " ... $DESC: $NAME is already running!"; exit 1; fi case "$usagetype" in root) su - $COD4_USER -c "cd $DIR ; screen -AmdS $NAME ./$DAEMON $PARAMS" ;; nonroot) cd $DIR ; screen -AmdS $NAME ./$DAEMON $PARAMS ;; esac } stop () { if ! status; then echo " ... $DESC $NAME could not be found. Probably not running."; exit 1; fi case "$usagetype" in root) tmp=$(su - $COD4_USER -c "screen -ls" | awk -F . "\$2 ~ /^$NAME[[:space:]].*/ {print \$1}" | awk '{print $1}') su - $COD4_USER -c "screen -r $tmp -X quit" ;; nonroot) screen -r $(screen -ls | awk -F . "\$2 ~ /^$NAME[[:space:]].*/ {print \$1}" | awk '{print $1}') -X quit ;; esac } status () { case "$usagetype" in root) su - $COD4_USER -c "screen -ls" | grep [.]$NAME[[:space:]] > /dev/null ;; nonroot) screen -ls | grep [.]$NAME[[:space:]] > /dev/null ;; esac } watch () { if ! status; then echo "$DESC $NAME could not be found. Probably not running."; exit 1; fi case "$usagetype" in root) tmp=$(su - $COD4_USER -c "screen -ls" | awk -F . "\$2 ~ /^$NAME[[:space:]].*/ {print \$1}" | awk '{print $1}') su - $COD4_USER -c "screen -r $tmp" ;; nonroot) screen -r $(screen -ls | awk -F . "\$2 ~ /^$NAME[[:space:]].*/ {print \$1}" | awk '{print $1}') ;; esac } case "$1" in start) echo "Starting $DESC: $NAME" start echo " ... done." ;; stop) echo "Stopping $DESC: $NAME" stop echo " ... done." ;; restart) echo "Restarting $DESC: $NAME" status && stop start echo " ... done." ;; status) if status then echo "$DESC: $NAME is UP" else echo "$DESC: $NAME is DOWN" fi ;; watch) watch ;; *) echo "Usage: $0 {start|stop|status|restart|watch}\nWhile watching press ctrl-a, ctrl-d to stop watching without stopping the server." exit 1 ;; esac exit 0
Hoffe mir kann da jemand helfen
Gruß
D3v1l