<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18783">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=tomdagreek@gmail.com href="mailto:tomdagreek@gmail.com">tom 
  nikitopoulos</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cod@icculus.org 
  href="mailto:cod@icculus.org">Call of Duty server admin list.</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 17, 2009 6:23 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [cod] bash script</DIV>
  <DIV><BR></DIV>thanks to all...i will research all of these<BR>ty<BR><BR>
  <DIV class=gmail_quote>On Wed, Jun 17, 2009 at 11:06 AM, Geoff Goas <SPAN 
  dir=ltr>&lt;<A href="mailto:gitman@gmail.com">gitman@gmail.com</A>&gt;</SPAN> 
  wrote:<BR>
  <BLOCKQUOTE 
  style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>here's the one i wrote up using start-stop-daemon 
    (compiled from debian's dpkg package)<BR><BR><A 
    href="http://fragile.anarchic-x.net/~cod2/startup_script.txt" 
    target=_blank>http://fragile.anarchic-x.net/~cod2/startup_script.txt</A><BR><BR>the 
    options will need to be changed to suit your environment
    <DIV>
    <DIV></DIV>
    <DIV class=h5><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" 
    target=_blank>wb7awl@lawsonpc.com</A>&gt;</SPAN> wrote:<BR>
    <BLOCKQUOTE 
    style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
    class=gmail_quote><BR>Here's another one. &nbsp;I'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. &nbsp;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># &nbsp; &nbsp; &nbsp; 
      /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 "cod5 start" 
      in your<BR># /etc/rc.d/rc.local 
      file.<BR>#<BR><BR>HOME="/root/cod5"<BR>BIN="/root/cod5/codwaw_lnxded-bin"<BR>BATCH="/root/cod5/codwaw_lnxded"<BR>CLOSED="+set 
      dedicated 2 +exec closed-server.cfg +map_rotate +set<BR>sv_punkbuster 
      0"<BR>OPEN="+set fs_localAppData $HOME +set dedicated 2 +exec 
      server.cfg<BR>+map_rotate +set sv_punkbuster 1"<BR>#MOD="+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"<BR>MOD="+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"<BR>LOCKFILE="/var/lock/subsys/cod5"<BR>NETIP="+set net_ip 
      192.168.0.253"<BR><BR>RETVAL=0<BR>PROG="CoD5 WaW Server"<BR><BR>up() 
      {<BR>&nbsp; &nbsp; &nbsp; &nbsp;cd $HOME<BR>&nbsp; &nbsp; &nbsp; &nbsp;if 
      test -f $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; &nbsp;then<BR>&nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp;echo -n "The $PROG is already 
      running!"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp;else<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo 
      -n $"Starting $PROG in the CLOSED configuration!"<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;$BIN $CLOSED &gt;/dev/null 2&gt;&amp;1 &amp;<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RETVAL=$?<BR>&nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp;[ $RETVAL -eq 0 ] &amp;&amp; touch $LOCKFILE<BR>&nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp;echo<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;fi<BR>}<BR><BR>open() {<BR>&nbsp; &nbsp; &nbsp; &nbsp;cd 
      $HOME<BR>&nbsp; &nbsp; &nbsp; &nbsp;if test -f $LOCKFILE<BR>&nbsp; &nbsp; 
      &nbsp; &nbsp;then<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo -n "The 
      $PROG is already running!"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp;echo<BR>&nbsp; &nbsp; &nbsp; &nbsp;else<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;echo -n $"Starting $PROG in the OPEN 
      configuration!"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$BIN $OPEN 
      &gt;/dev/null 2&gt;&amp;1 &amp;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp;RETVAL=$?<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[ $RETVAL -eq 
      0 ] &amp;&amp; touch $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp;echo<BR>&nbsp; &nbsp; &nbsp; &nbsp;fi<BR>}<BR>war() {<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp;cd $HOME<BR>&nbsp; &nbsp; &nbsp; &nbsp;if test -f 
      $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; &nbsp;then<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;echo -n "The $PROG is already running!"<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;else<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo -n $"Starting 
      $PROG in the WAR Configuration!"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp;$BIN $WAR &gt;/dev/null 2&gt;&amp;1 &amp;<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;RETVAL=$?<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
      &nbsp;[ $RETVAL -eq 0 ] &amp;&amp; touch $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp;echo<BR>&nbsp; &nbsp; &nbsp; &nbsp;fi<BR>}<BR>start() 
      {<BR>&nbsp; &nbsp; &nbsp; &nbsp;cd $HOME<BR>&nbsp; &nbsp; &nbsp; &nbsp;if 
      test -f $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; &nbsp;then<BR>&nbsp; &nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp;echo -n "The $PROG is already 
      running!"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp;else<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo 
      -n $"Starting $PROG in the Modified Game<BR>Configuration!"<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$BIN $MOD &gt;/dev/null 2&gt;&amp;1 
      &amp;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RETVAL=$?<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[ $RETVAL -eq 0 ] &amp;&amp; touch 
      $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp;fi<BR>}<BR><BR>stop() {<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;echo -n $"Stopping $PROG"<BR>&nbsp; &nbsp; &nbsp; &nbsp;killall -9 
      $BIN<BR>&nbsp; &nbsp; &nbsp; &nbsp;RETVAL=$?<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;[ $RETVAL -eq 0 ] &amp;&amp; rm -f $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;echo<BR>}<BR><BR>clearpid() {<BR>&nbsp; &nbsp; &nbsp; &nbsp;echo -n 
      $"Clearing PID Lockfile"<BR>&nbsp; &nbsp; &nbsp; &nbsp;rm -f 
      $LOCKFILE<BR>&nbsp; &nbsp; &nbsp; &nbsp;echo<BR>}<BR>#<BR># &nbsp; &nbsp; 
      &nbsp; See how we were called.<BR>#<BR>case "$1" 
      in<BR>&nbsp;start)<BR>&nbsp; &nbsp; &nbsp; &nbsp;start<BR>&nbsp; &nbsp; 
      &nbsp; &nbsp;;;<BR>&nbsp;stop)<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;stop<BR>&nbsp; &nbsp; &nbsp; &nbsp;;;<BR>&nbsp;open)<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp;open<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;;;<BR>&nbsp;war)<BR>&nbsp; &nbsp; &nbsp; &nbsp;war<BR>&nbsp; &nbsp; 
      &nbsp; &nbsp;;;<BR>&nbsp;clearpid)<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;clearpid<BR>&nbsp; &nbsp; &nbsp; &nbsp;;;<BR>&nbsp;mod)<BR>&nbsp; 
      &nbsp; &nbsp;mod<BR>&nbsp; &nbsp; 
      &nbsp;;;<BR>&nbsp;reload|restart)<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;stop<BR>&nbsp; &nbsp; &nbsp; &nbsp;start<BR>&nbsp; &nbsp; &nbsp; 
      &nbsp;RETVAL=$?<BR>&nbsp; &nbsp; &nbsp; &nbsp;;;<BR><BR>&nbsp;*)<BR>&nbsp; 
      &nbsp; &nbsp; &nbsp;echo $"Usage: $0 
      {start|stop|restart|reload|open}"<BR>&nbsp; &nbsp; &nbsp; &nbsp;exit 
      1<BR>esac<BR><BR>exit $RETVAL<BR>
      <DIV>
      <DIV></DIV>
      <DIV><BR><BR><BR>_______________________________________________<BR>cod 
      mailing list<BR><A href="mailto:cod@icculus.org" 
      target=_blank>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></DIV></DIV><FONT color=#888888>-- <BR>Geoff Goas<BR>Network 
    Engineer<BR></FONT><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><BR></BLOCKQUOTE></DIV><BR>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>cod mailing 
  list<BR>cod@icculus.org<BR>http://icculus.org/mailman/listinfo/cod<BR></BLOCKQUOTE></BODY></HTML>