Io stavo provando cosi:
cat /home/desktop/deathrun.log | sudo /etc/init.d/cod4-daemon2 start e il risultato è il medesimo, nessuna segnalazione di errore :~$ cat /home/desktop/deathrun.log | sudo /etc/init.d/cod4-daemon2 start * Starting Call of Duty 4 server2 [ OK ] Ho notato che qui sotto c'è questa riga: SUDO_COMMAND=/etc/init.d/cod4-daemon2 stop perche stavo provando a fare stop ma mi dava errore : * Stopping Call of Duty 4 server2 start-stop-daemon: warning: failed to kill 2066: No such process [ OK ] sicuramente crasha... Grazie ancora. Il 10.11.2013 14:20 [email protected] ha scritto: > Ho fatto come mi hai detto tu e sul file che ho trovato c'è quanto segue: > > SHELL=/bin/bash > TERM=xterm > USER=root > LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35 :*.ogx=0 1;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: > SUDO_USER=desktop > SUDO_UID=1000 > USERNAME=root > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin > MAIL=/var/mail/desktop > PWD=/home/desktop > LANG=it_IT > SHLVL=1 > SUDO_COMMAND=/etc/init.d/cod4-daemon2 stop > HOME=/home/desktop > LOGNAME=root > SUDO_GID=1000 > _=/usr/bin/env > Non mi sembra ci vengano segnalati errori. > > Non essendo pratico di variabili e script riporto anche il file cod4-daemon2: > > #! /bin/sh > ### BEGIN INIT INFO > # Provides: Call of Duty 4 > # Required-Start: $local_fs > # Required-Stop: $local_fs > # Default-Start: 2 3 4 5 > # Default-Stop: S 0 1 6 > # Short-Description: Call of Duty 4 Server > # Description: Call of Duty 4 Server > ### END INIT INFO > > #set -x > #echo whoami: `whoami` > # of: echo whoami: $(whoami) > env > /home/desktop/deathrun.log > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin > DESC="Call of Duty 4" > NAME=server2 > HOME_DIR=/home/desktop/cod4-server > > SCRIPTNAME=/etc/init.d/$NAME > > DAEMON=$HOME_DIR/cod4_lnxded > DAEMON_USER=desktop > DAEMON_GROUP=desktop > > DAEMON_ARGS="+set fs_homepath /home/desktop/cod4-server/ +set fs_savepath /home/desktop/cod4-server +set fs_game "modsdeathrun_12" +set dedicated 2 +set net_port "28963" + set net_ip "5.135.191.173" +set g_gametype "deathrun" +exec server.cfg +map mp_dr_bananaphone +vstr startup" > #DAEMON_ARGS="+set fs_game "mods/k3" +exec server.cfg +set dedicated 2 + set net_port "28962" + set sv_maxclients "30" +set ui_maxclients "30" +map_rotate +set sv_punkbuster "0" + pb_sv_guidrelax 7" > #DAEMON_ARGS="+set fs_homepath /home/desktop/cod4-server/ +set fs_savepath /home/desktop/cod4-server +set fs_game "modsdeathrun_12" +set dedicated 2 +set net_port "28963" + set net_ip "5.135.191.173" +set g_gametype "deathrun" +exec server.cfg +map mp_dr_bananaphone +vstr startup" > > COD4_PID_FILE="/var/run/cod4/${NAME}.pid" > > # Exit if the package is not installed > if [ ! -x "$DAEMON" ]; then > { > echo "Couldn't find $DAEMON" > exit 99 > } > fi > > PIDDIR=`dirname "$COD4_PID_FILE"` > if [ "$PIDDIR" -a "$PIDDIR" != "/var/run" ] ; then > if [ ! -d "$PIDDIR" ] ; then > mkdir "$PIDDIR" > fi > if [ "$DAEMON_USER" ] ; then > chown "$DAEMON_USER" "$PIDDIR" > fi > if [ "$DAEMON_GROUP" ] ; then > chgrp "$DAEMON_GROUP" "$PIDDIR" > fi > fi > > # Define LSB log_* functions. > # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. > . /lib/lsb/init-functions > > # > # Function that check the daemon/service > # > do_status() > { > NB_PROCESS=`ps ax | grep server2 | grep "$B3_CONFIGFILE" | grep -v grep | wc -l` > if [ $NB_PROCESS -gt 1 ]; then > log_warning_msg "WARNING: $NAME is running multiple times" > return 0 > elif [ $NB_PROCESS -eq 1 ]; then > return 0 > else > return 1 > fi > } > > # > # Function that starts the daemon/service > # > do_start() > { > # Return > # 0 if daemon has been started > # 1 if daemon was already running > # 2 if daemon could not be started > start-stop-daemon --start --quiet --chuid $DAEMON_USER:$DAEMON_GROUP --pidfile $COD4_PID_FILE --make-pidfile > --background --chdir $HOME_DIR --startas $DAEMON -- $DAEMON_ARGS > return $? > } > > # > # Function that stops the daemon/service > # > do_stop() > { > # Return > # 0 if daemon has been stopped > # 1 if daemon was already stopped > # 2 if daemon could not be stopped > # other if a failure occurred > start-stop-daemon --stop --signal 15 --retry 5 --quiet --pidfile $COD4_PID_FILE > RETVAL="$?" > [ "$RETVAL" = 0 ] && rm -f $COD4_PID_FILE > [ "$RETVAL" = 2 ] && return 2 > return "$RETVAL" > } > > do_kill() { > while [ 1 ]; do > PID=`ps hax | grep "server2" | grep -v grep | cut -d' ' -f1 | head -n1` > [ "$PID" = "" ] && return > log_daemon_msg "killing process [$PID]" > kill -9 $PID > done > } > > case "$1" in > start) > log_daemon_msg "Starting $DESC" "$NAME" > do_start > case "$?" in > 0|1) log_end_msg 0 ;; > 2) log_end_msg 1 ;; > esac > ;; > stop) > log_daemon_msg "Stopping $DESC" "$NAME" > do_stop > case "$?" in > 0|1) log_end_msg 0 ;; > 2) log_end_msg 1 ;; > esac > ;; > status) > do_status > case "$?" in > 1) log_success_msg " stopped" ;; > 0) log_success_msg " running" ;; > esac > ;; > kill) > log_daemon_msg "Killing all process server2" > do_kill > log_end_msg 0 > ;; > restart|force-reload) > log_daemon_msg "Restarting $DESC" "$NAME" > do_stop > case "$?" in > 0|1) > do_start > case "$?" in > 0) log_end_msg 0 ;; > 1) log_end_msg 1 ;; # Old process is still running > *) log_end_msg 1 ;; # Failed to start > esac > ;; > *) > # Failed to stop > log_end_msg 1 > ;; > esac > ;; > *) > echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 > exit 3 > ;; > esac > > : > > # FINE SCRIPT > > Grazie per l'aiuto... > > Ivan > > Il 10.11.2013 13:40 Daniele Siddi ha scritto: > >> Puoi mettere tra le prime righe dello script questa istruzione: >> env > /tmp/environment >> in modo che ti scriva su quel file lo stato di tutte le variabili, e lanciare lo script (reboot?) >> Inoltre, assicurati di redirigere lo standard error su un file, in maniera che possa trovare informazioni interessanti. >> Ciao >> >> Il giorno 10 novembre 2013 13:28, ha scritto: >> >>> Ciao a tutti, >>> >>> Tempo fà, col vostro aiuto, avevo fatto degli script che facevano partire un server di call of duty 4 su ubuntu. Anzi era un demone con le variabili DAEMON ARGS etc etc. tutto funzionava a meraviglia fino a poco tempo fa. Questi script sono 5 e di questi 5 uno non va più. Non fa partire il server. >>> >>> Volevo satere se esiste un modo di monitorare cosa accade quando viene startato con qualcosa tipo screen. >>> >>> Per notizia aggiungo che i log di cod4 li trovo vuoti (quelli del server incriminato). >>> >>> Il bello e che se lo starto con uno script parte senza problemi, e logga tutto, se invece lo faccio partire dal demone tutto tace. Nel ARGS del demone ho fatto copia e incolla dello script funzionante. >>> >>> Non so se mi sono spiegato correttamente se serve posto lo script, ma penso che mi basterebbe sapere come monitorare quello che accade quando faccio start. >>> >>> Grazie in anticipo a chi poresse darmi una mano a capire. >>> >>> Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot in TV. Per ogni nuovo abbonato 30 EUR di premio per te e per lui! Un amico al mese e parli e navighi sempre gratis http://freelosophy.tiscali.it/ [1] >>> >>> _______________________________________________ >>> Gulchelp mailing list >>> [email protected] [2] >>> http://www.gulch.crs4.it/cgi-bin/mailman/listinfo/gulchelp [3] > > Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot in TV. Per ogni nuovo abbonato 30 EUR di premio per te e per lui! Un amico al mese e parli e navighi sempre gratis http://freelosophy.tiscali.it/ [5] Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un amico al mese e parli e navighi sempre gratis http://freelosophy.tiscali.it/ [6] Links: ------ [1] http://freelosophy.tiscali.it/ [2] mailto:[email protected] [3] http://www.gulch.crs4.it/cgi-bin/mailman/listinfo/gulchelp [4] mailto:[email protected] [5] http://freelosophy.tiscali.it/ [6] http://freelosophy.tiscali.it/ Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un amico al mese e parli e navighi sempre gratis http://freelosophy.tiscali.it/
_______________________________________________ Gulchelp mailing list [email protected] http://www.gulch.crs4.it/cgi-bin/mailman/listinfo/gulchelp
