gurba-0.40/
gurba-0.40/bin/
gurba-0.40/lib/
gurba-0.40/lib/cmds/guild/fighter/
gurba-0.40/lib/cmds/monster/
gurba-0.40/lib/cmds/race/catfolk/
gurba-0.40/lib/cmds/race/dwarf/
gurba-0.40/lib/cmds/verb/
gurba-0.40/lib/daemons/data/
gurba-0.40/lib/data/boards/
gurba-0.40/lib/data/messages/
gurba-0.40/lib/data/players/
gurba-0.40/lib/design/
gurba-0.40/lib/domains/gurba/
gurba-0.40/lib/domains/gurba/guilds/fighter/
gurba-0.40/lib/domains/gurba/monsters/
gurba-0.40/lib/domains/gurba/objects/armor/
gurba-0.40/lib/domains/gurba/objects/clothing/
gurba-0.40/lib/domains/gurba/objects/weapons/
gurba-0.40/lib/domains/gurba/vendors/
gurba-0.40/lib/kernel/cmds/admin/
gurba-0.40/lib/kernel/daemons/
gurba-0.40/lib/kernel/include/
gurba-0.40/lib/kernel/lib/
gurba-0.40/lib/kernel/net/
gurba-0.40/lib/kernel/sys/
gurba-0.40/lib/logs/
gurba-0.40/lib/pub/
gurba-0.40/lib/std/modules/languages/
gurba-0.40/lib/std/races/
gurba-0.40/lib/std/races/monsters/
gurba-0.40/lib/wiz/fudge/
gurba-0.40/lib/wiz/spud/
gurba-0.40/src/host/beos/
gurba-0.40/src/host/pc/res/
gurba-0.40/src/kfun/
gurba-0.40/src/lpc/
gurba-0.40/src/parser/
gurba-0.40/tmp/
#!/bin/bash
# A bash script to keep the mud up by looking at ps and seeing if
# the driver or startmud script is going, and if it isn't, then
# it invokes that command.  This is meant to be called from your
# machines cron system, so you should add an entry to your crontab
# 0,30 * * * * ~/bin/keepup
# which will check every 30 minutes to see if your mud is still up.
# grep is probably not the best way to check, a regexp is probably
# better, but I figure your executable name should be long and fairly unique if
# you invoke with the full path name, and I'd prefer this to be easily
#portable between shells, and rexexp syntax differs between shells.

#Redistribute freely, as usual

#
# Modify these as necessary
#
dgddir=/home/erlends/gurba
port=3000

#######
netstat="netstat -a -t -n"
searchfor="$port.*LISTEN"
startmud=$dgddir/startmud

isup=$($netstat | grep $searchfor)

if [ ${#isup} -eq 0 ]; then
  $startmud &
fi