~swag/armagetronad/0.2.9-sty+ct+ap-fork

« back to all changes in this revision

Viewing changes to batch/serverstarter.in

  • Committer: z-man
  • Date: 2007-02-01 15:41:40 UTC
  • Revision ID: svn-v3-list-QlpoOTFBWSZTWZvbKhsAAAdRgAAQABK6798QIABURMgAAaeoNT1TxT1DQbKaeobXKiyAmlWT7Y5MkdJOtXDtB7w7DOGFBHiOBxaUIu7HQyyQSvxdyRThQkJvbKhs:7d95bf1e-0414-0410-9756-b78462a59f44:armagetronad%2Fbranches%2F0.2.8%2Farmagetronad:7102
Replaced $(( )) with `expr `.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
  # give up if restarts come too quickly; ten per minute is suspicious
27
27
  OLDESTSTART=${STARTDATE_LOG[1]}
28
28
  if [ ! -z "$OLDESTSTART" ]; then
29
 
      TIMESPENT=$((STARTDATE-OLDESTSTART))
 
29
      TIMESPENT=`expr ${STARTDATE} - ${OLDESTSTART}`
30
30
      if [ TIMESPENT -lt 60 ]; then
31
31
          echo "Stopping server, it is restarting too quickly."
32
32
          rm -f ${PIDDIR}/@progname@-starter.pid
37
37
 
38
38
  # keep log of past start dates
39
39
  for f in 1 2 3 4 5 6 7 8 9; do
40
 
      next=$((f+1))
 
40
      next=`expr $f + 1`
41
41
      STARTDATE_LOG[$f]=${STARTDATE_LOG[$next]}
42
42
  done
43
43
  STARTDATE_LOG[10]=${STARTDATE}