-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrc-suse.sh.in
More file actions
57 lines (49 loc) · 991 Bytes
/
rc-suse.sh.in
File metadata and controls
57 lines (49 loc) · 991 Bytes
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
46
47
48
49
50
51
52
53
54
55
#! /bin/sh
#
# Author: Stephane Lentz
#
### BEGIN INIT INFO
# Provides: milter-greylist
# Required-Start: $remote_fs
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: Start the milter-greylist filter
### END INIT INFO
pidfile="/var/run/milter-greylist.pid"
socket="/var/milter-greylist/milter-greylist.sock"
user=@USER@
binary=@BINDIR@/milter-greylist
OPTIONS="-T -L 24 -w 14m -P $pidfile -u $user -p $socket"
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Starting milter-greylist"
startproc -p $pidfile $binary $OPTIONS
rc_status -v
;;
stop)
echo -n "Shutting down milter-greylist"
killproc -p $pidfile $binary
rc_status -v
;;
try-restart)
$0 stop && $0 start
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
status)
echo -n "Checking for service milter-greylist: "
checkproc -p $pidfile $binary
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart}"
exit 1
esac
rc_exit