File: rc-solaris.sh.in

package info (click to toggle)
milter-greylist 3.0-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 920 kB
  • ctags: 787
  • sloc: ansic: 6,864; sh: 3,205; yacc: 736; lex: 321; makefile: 166
file content (41 lines) | stat: -rw-r--r-- 1,011 bytes parent folder | download | duplicates (5)
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