-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrc-solaris.sh.in
41 lines (37 loc) · 1011 Bytes
/
rc-solaris.sh.in
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
#!/sbin/sh
# /etc/init.d/greymilter : link this file with /etc/rc2.d/S78greymilter
# Usage :
# /usr/local/bin/milter-greylist [-ADvqST] [-a autowhite] [-d dumpfile]
# [-f configfile] [-w delay] [-u username] [-L cidrmask] -p socket
#
# Conf : /etc/mail/greylist.conf
mildir="/var/milter-greylist"
socket="$mildir/milter-greylist.sock"
binpath="@BINDIR@"
user="@USER@"
OPTIONS="-v -w 14m"
case "$1" in
start)
# Start daemon.
echo "Starting milter-greylist: ... \c"
chown $user $mildir
$binpath/milter-greylist $OPTIONS
echo "done."
;;
stop)
# Stop daemons.
echo "Shutting down milter-greylist: ... \c"
/usr/bin/pkill milter-greylist
echo "done."
;;
restart)
echo "Restarting milter-greylist: ... \c"
/usr/bin/pkill milter-greylist
$binpath/milter-greylist $OPTIONS
echo "done."
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0