hallo liebe Manufreunde,
ich habe einen Linuxserver auf dem ein Cod 4 Server läuft, den starte ich mit diesem Initscript
Spoiler anzeigen
#!/bin/sh
### BEGIN INIT INFO
# Provides: Cod_1
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 5
# Description: 
### END INIT INFO
case "$1" in
'start')
#! /bin/sh 
######################################################### 
# STARTSCRIPT FÜR EINEN Call of Duty 2 SERVER # 
######################################################### 
# Benutzung auf eigene Gefahr!!!!!!!!!!! # 
# SCREEN muss auf dem Server installiert sein! # 
######################################################### 
# Vars: # 
# G_USER Username # 
# NAME Screen-Name # 
# DESC Server-Beschreibung # 
# PARAMS Start-Parameter # 
# DIR HLDS Directory (absolut) # 
# SCRIPT Serverstart-Script # 
# DAEMON Daemon # 
######################################################### 
# OPTIONS: (start|stop|restart|status) # 
#########################################################
################## User ################################ 
# Username unter dem der Server laufen soll 
# NICHT als root laufen lassen 
G_USER=cod4_60
################## Vars ################################# 
# Screen NAME 
# Attach Screen : # screen -r NAME 
# Detach Screen : # [CTRL]+[A]; [D] 
# Don't press [CTRL]+[C] it will terminate screen 
NAME=cod4_60
################## Server Description ################### 
# Single Word DESC=myserver 
# Multiple Words DESC="This is my Server" 
DESC="Call of Duty 4 Server" 
################## Parameter ############################ 
# CAN USE: +servercfgfile server.cfg OR +exec server.cfg 
PARAMS="screen -A -m -d -S cod4_60 /home/cod4_60/cod4_lnxded +set net_ip xxx.xxx.xxx.xxx +set net_port 28960 +set sv_punkbuster 0 +set sv_pure 1 +exec server.cfg +set dedicated 2 +set fs_game +map_rotate +set fs_gamepath /home/cod4_60"
################## Directory ############################ 
# Pfad zum cod2-Directory (absolute) 
DIR=/home/cod4_60
################## DAEMON ############################## 
# Hier das Startscript platzieren, normalerweise hlds_run 
SCRIPT=cod4_lnxded 
######################################################## 
#### NICHTS UNTER DIESER ZEILE VERÄNDERN ! ! ! #### 
########################################################
DAEMON=$DIR/$SCRIPT
case "$1" in 
start) 
if [[ `su $G_USER -c "screen -ls | grep $NAME"` ]] 
then 
echo "$DESC läuft bereits!" 
else 
echo "Starte $DESC " 
su $G_USER -c "cd $DIR; screen -d -m -S $NAME $DAEMON $PARAMS" 
fi 
;;
stop) 
if [[ `su $G_USER -c "screen -ls | grep $NAME"` ]] 
then 
echo -n "Stoppe $DESC " 
kill `ps aux | grep -i screen | grep -i $NAME | awk '{print $2}'` 
echo " ... done." 
else 
echo "Kein laufenden $DESC gefunden!" 
fi 
;;
restart) 
if [[ `su $G_USER -c "screen -ls | grep $NAME"` ]] 
then 
echo -n "Stoppe $DESC " 
kill `ps aux | grep -i screen | grep -i $NAME | awk '{print $2}'` 
echo " ... done." 
else 
echo "Kein laufenden $DESC gefunden!" 
fi
echo -n "Starte $DESC" 
su $G_USER -c "cd $DIR; screen -d -m -S $NAME $DAEMON $PARAMS" 
echo " ... done." 
;;
status) 
ps aux | grep -v grep | grep cod > /dev/null 
CHECK=$? 
[ $CHECK -eq 0 ] && echo "$DESC ist online"  echo "$DESC ist offline"
 echo "$DESC ist offline" 
;; 
*)
echo "Benutze: $0 {start|stop|restart|status}" 
exit 1 
;; 
esac
exit 0
--- 
;;
'stop')
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
;;
'stop')
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
;;
'stop')
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
;;
'stop')
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
und für den Manumod mit diesem Script
Spoiler anzeigen
#!/bin/sh
### BEGIN INIT INFO
# Provides: cod4_60_port_60_adminmod
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 5
# Description: 
### END INIT INFO
case "$1" in
'start')
#!/bin/sh
# STARTSCRIPT by Hool and manu
# Much thanks to him 
#
# If you have any problems, visit manuadminmod.de
# or contact manuel.strider@web.de
#
#============================
#
#=========
# CONFIG
#=========
#
# Name of process
# Unique for each mod installation
#=================================
NAME=ManuAdminMod_60
#Default: NAME=ManuAdminMod_1
#
# Basedir to adminmod installation:
#==================================
#DIR=/home/gameserver/cod4_1/adminmod
DIR=/home/cod4_60/adminmod
#Example: DIR=/var/games/cod4/adminmod
#
# Path to config directory
#=========================
CFGDIR=config
#Default: CFGDIR=config
#
# Path to log directory
#======================
LOGDIR=log
#Default: LOGDIR=log
#
# Additional parameters for the mod (e.g. -force)
#================================================
PARAMS=""
#Default: PARAMS=""
#
# Path to php-binary
# Normally only 'php'
#===================
PHP=php
#Example: PHP=/usr/local/bin/php
#
# Parameters for PHP (only for versed user)
#==========================================
PHPPARAMS="-f"
#Default: PARAMS="-f"
#
#==================================
# DO NOT EDIT STH BELOW THIS LINE
#==================================
# -------------------------------------------------------------------
case "$1" in
start)
cd $DIR
screen -dmS $NAME $PHP $PHPPARAMS daemon.php -- -configdir "$CFGDIR" -logdir "$LOGDIR" $PARAMS
echo "$NAME was started. If you have problems try '$0 debug'"
;;
stop)
if [[ `screen -ls |grep $NAME` ]]
then
kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
echo "$NAME was stopped"
else
echo "Error: $NAME isn't currently running"
fi
;;
status)
if [[ `screen -ls |grep $NAME` ]]
then
echo "$NAME is currently running"
else
echo "$NAME is NOT running"
fi
;;
debug)
if [[ `screen -ls |grep $NAME` ]]
then
echo "Error: $NAME is running, use '$0 stop' to stop it"
else
cd $DIR
$PHP $PHPPARAMS daemon.php -- -configdir "$CFGDIR" -logdir "$LOGDIR" $PARAMS
fi
;;
show)
tail -f "$LOGDIR/mod.log"
;;
*)
echo "Usage: $0 {start|stop|status|debug|show}"
exit 1
;;
esac
exit 0
;;
'stop')
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
;;
'stop')
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
wenn ich aber den Linuxserver neu starte dann startet nur der Cod4 Server und der Manumod nicht
kann mir jemand helfen ?