File: check-muh

package info (click to toggle)
muh 2.05d-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 496 kB
  • ctags: 637
  • sloc: ansic: 2,826; sh: 164; makefile: 132; lex: 105; yacc: 96
file content (28 lines) | stat: -rwxr-xr-x 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# put this line into your crontab (man crontab):
# 0,10,20,30,40,50 * * * * /home/user/check-muh >/dev/null 2>&1
# this will check for a running muh every 10 minutes
#
# $Id: check-muh,v 1.5 2000/03/10 19:10:02 zap Exp $
#

MUHBIN=$HOME/muh/muh

# MUHBIN=/usr/bin/muh

# this is where the muh-binary itself resides

# you don't need to modify anything below

cd $HOME/.muh/
if test -r pid; then
  pid=`cat pid`
  if `kill -USR1 $pid >/dev/null 2>&1`; then
    exit 0
  fi
  rm -f pid
fi
echo "reloading muh..."
$MUHBIN
exit 0