here&#39;s the one i wrote up using start-stop-daemon (compiled from debian&#39;s dpkg package)<br><br><a href="http://fragile.anarchic-x.net/~cod2/startup_script.txt">http://fragile.anarchic-x.net/~cod2/startup_script.txt</a><br>
<br>the options will need to be changed to suit your environment<br><br><div class="gmail_quote">On Tue, Jun 16, 2009 at 9:33 AM, Albert D. Lawson <span dir="ltr">&lt;<a href="mailto:wb7awl@lawsonpc.com">wb7awl@lawsonpc.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Here&#39;s another one.  I&#39;d use it as a more of a guide than an actual<br>
script because flavors<br>
of Linux vary...but it should give you an idea or two.  Note that<br>
depending on how you call the<br>
script, you can invoke different commands and/or config files...<br>
<br>
#!/bin/bash<br>
#<br>
#       /root/scripts/cod5<br>
#<br>
# Starts the Call of Duty 5 server daemon<br>
# To start the daemon at runtime, put the<br>
# script command &quot;cod5 start&quot; in your<br>
# /etc/rc.d/rc.local file.<br>
#<br>
<br>
HOME=&quot;/root/cod5&quot;<br>
BIN=&quot;/root/cod5/codwaw_lnxded-bin&quot;<br>
BATCH=&quot;/root/cod5/codwaw_lnxded&quot;<br>
CLOSED=&quot;+set dedicated 2 +exec closed-server.cfg +map_rotate +set<br>
sv_punkbuster 0&quot;<br>
OPEN=&quot;+set fs_localAppData $HOME +set dedicated 2 +exec server.cfg<br>
+map_rotate +set sv_punkbuster 1&quot;<br>
#MOD=&quot;+set fs_basepath $HOME +set fs_homepath $HOME +set fs_localAppData<br>
$HOME +set fs_game mods/war +set dedicated 2 +exec custom.cfg<br>
+map_rotate +set sv_punkbuster 0&quot;<br>
MOD=&quot;+set fs_basepath $HOME +set fs_homepath $HOME +set dedicated 2 +set<br>
fs_game mods/x5 +exec x5.cfg +map_rotate +set sv_punkbuster 1&quot;<br>
LOCKFILE=&quot;/var/lock/subsys/cod5&quot;<br>
NETIP=&quot;+set net_ip 192.168.0.253&quot;<br>
<br>
RETVAL=0<br>
PROG=&quot;CoD5 WaW Server&quot;<br>
<br>
up() {<br>
        cd $HOME<br>
        if test -f $LOCKFILE<br>
        then<br>
            echo -n &quot;The $PROG is already running!&quot;<br>
            echo<br>
        else<br>
            echo -n $&quot;Starting $PROG in the CLOSED configuration!&quot;<br>
            $BIN $CLOSED &gt;/dev/null 2&gt;&amp;1 &amp;<br>
            RETVAL=$?<br>
            [ $RETVAL -eq 0 ] &amp;&amp; touch $LOCKFILE<br>
            echo<br>
        fi<br>
}<br>
<br>
open() {<br>
        cd $HOME<br>
        if test -f $LOCKFILE<br>
        then<br>
            echo -n &quot;The $PROG is already running!&quot;<br>
            echo<br>
        else<br>
            echo -n $&quot;Starting $PROG in the OPEN configuration!&quot;<br>
            $BIN $OPEN &gt;/dev/null 2&gt;&amp;1 &amp;<br>
            RETVAL=$?<br>
            [ $RETVAL -eq 0 ] &amp;&amp; touch $LOCKFILE<br>
            echo<br>
        fi<br>
}<br>
war() {<br>
        cd $HOME<br>
        if test -f $LOCKFILE<br>
        then<br>
            echo -n &quot;The $PROG is already running!&quot;<br>
            echo<br>
        else<br>
            echo -n $&quot;Starting $PROG in the WAR Configuration!&quot;<br>
            $BIN $WAR &gt;/dev/null 2&gt;&amp;1 &amp;<br>
            RETVAL=$?<br>
            [ $RETVAL -eq 0 ] &amp;&amp; touch $LOCKFILE<br>
            echo<br>
        fi<br>
}<br>
start() {<br>
        cd $HOME<br>
        if test -f $LOCKFILE<br>
        then<br>
            echo -n &quot;The $PROG is already running!&quot;<br>
            echo<br>
        else<br>
            echo -n $&quot;Starting $PROG in the Modified Game<br>
Configuration!&quot;<br>
            $BIN $MOD &gt;/dev/null 2&gt;&amp;1 &amp;<br>
            RETVAL=$?<br>
            [ $RETVAL -eq 0 ] &amp;&amp; touch $LOCKFILE<br>
            echo<br>
        fi<br>
}<br>
<br>
stop() {<br>
        echo -n $&quot;Stopping $PROG&quot;<br>
        killall -9 $BIN<br>
        RETVAL=$?<br>
        [ $RETVAL -eq 0 ] &amp;&amp; rm -f $LOCKFILE<br>
        echo<br>
}<br>
<br>
clearpid() {<br>
        echo -n $&quot;Clearing PID Lockfile&quot;<br>
        rm -f $LOCKFILE<br>
        echo<br>
}<br>
#<br>
#       See how we were called.<br>
#<br>
case &quot;$1&quot; in<br>
  start)<br>
        start<br>
        ;;<br>
  stop)<br>
        stop<br>
        ;;<br>
  open)<br>
        open<br>
        ;;<br>
  war)<br>
        war<br>
        ;;<br>
  clearpid)<br>
        clearpid<br>
        ;;<br>
  mod)<br>
      mod<br>
      ;;<br>
  reload|restart)<br>
        stop<br>
        start<br>
        RETVAL=$?<br>
        ;;<br>
<br>
  *)<br>
        echo $&quot;Usage: $0 {start|stop|restart|reload|open}&quot;<br>
        exit 1<br>
esac<br>
<br>
exit $RETVAL<br>
<div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
cod mailing list<br>
<a href="mailto:cod@icculus.org">cod@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/cod" target="_blank">http://icculus.org/mailman/listinfo/cod</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Geoff Goas<br>Network Engineer<br>