Luk hat Recht, das sind ja nur PHP Parameter. da gehört natürlich nur das -f hin.
KOoL: This should work:
PHP
#! /bin/sh
# STARTSCRIPT by Hool and manu
# Many thanks to him :)
#
# If you have any problems, visit manuadminmod.de
# or contact manuel.strider@web.de
#
#============================
#
#=========
# CONFIG
#=========
#
# Name of process
#================
NAME=ManuAdminMod
#Default: NAME=ManuAdminMod
#
# Basedir to adminmod installation:
#==================================
DIR=/home/cod4/adminmod
#Example: DIR=/var/games/cod4/adminmod
#
# Path to php-binary
#===================
PHP=/usr/bin/php
#Example: PHP=/usr/local/bin/php
#
# Parameters for PHP (only for versed user)
#==========================================
PARAMS="-f"
#Default: PARAMS="-f"
#
# Parameter für MAM
#====================
MAMPARAMS="-configdir config32001 -logdir log32001 -force [main]ip 85.114.137.36 -force [tcp_query]port 32001"
#==================================
# DO NOT EDIT STH BELOW THIS LINE
#==================================
# -------------------------------------------------------------------
case "$1" in
start)
if [[ `screen -ls |grep $NAME` ]]
then
echo "Error: $NAME is already running, use '$0 stop' to stop it"
else
cd $DIR
screen -dmS $NAME $PHP $PARAMS daemon.php $MAMPARAMS
echo "$NAME was started. If you have problems try '$0 debug'"
fi
;;
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 $PARAMS daemon.php $MAMPARAMS
fi
;;
*)
echo "Usage: $0 {start|stop|status|debug}"
exit 1
;;
esac
exit 0
Alles anzeigen