Revision: | 1.1 |
Committed: | Wed Jul 25 01:05:17 2007 UTC (16 years, 10 months ago) by pippijn |
Branch: | MAIN |
CVS Tags: | HEAD |
Log Message: | - moved to GPL - added license information to files |
# | User | Rev | Content |
---|---|---|---|
1 | pippijn | 1.1 | #!/bin/sh |
2 | # | ||
3 | # crontab script for atheme | ||
4 | # | ||
5 | |||
6 | # Change this to the directory where you installed it | ||
7 | prefix=$HOME/atheme/ | ||
8 | pidfile=var/atheme.pid | ||
9 | |||
10 | cd "$prefix" || { | ||
11 | echo "$0: couldn't cd to $prefix" | ||
12 | exit 1 | ||
13 | } | ||
14 | |||
15 | if [ -f "$pidfile" ] ; then | ||
16 | PID=`cat "$pidfile"` | ||
17 | |||
18 | if kill -0 $PID >/dev/null 2>&1; then | ||
19 | exit 0 | ||
20 | fi | ||
21 | |||
22 | rm -f "$pidfile" | ||
23 | fi | ||
24 | |||
25 | echo "$0: couldn't find atheme running, restarting..." | ||
26 | |||
27 | ./bin/atheme | ||
28 | |||
29 | exit 0 |