blob: 97dbd2514da156681461b4e60b589712c08ab021 (
plain) (
blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
#
# tpop3d:
# Init script for starting/stopping tpop3d.
#
# Copyright (c) 2001 Chris Lightfoot. All rights reserved.
# Portability enhanced by Chris Elsworth, July 2001
#
# $FreeBSD$
#
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
DAEMON=$PREFIX/sbin/tpop3d
[ -f $DAEMON ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
$DAEMON -f $PREFIX/etc/tpop3d.conf -p /var/run/tpop3d.pid \
&& echo -n " tpop3d"
;;
stop)
# Stop daemons.
[ -r /var/run/tpop3d.pid ] && kill `cat /var/run/tpop3d.pid` \
&& echo -n " tpop3d"
;;
restart)
$0 stop
$0 start
;;
reload)
[ -r /var/run/tpop3d.pid ] && kill -HUP `cat /var/run/tpop3d.pid`
;;
*)
echo "Usage: `basename $0` {start|stop|restart|reload}"
exit 1
esac
exit 0
|