File: rc-suse.sh.in

package info (click to toggle)
milter-greylist 4.5.11-1.1
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 1,828 kB
  • ctags: 1,830
  • sloc: ansic: 17,049; yacc: 2,158; lex: 585; sh: 536; makefile: 156
file content (57 lines) | stat: -rw-r--r-- 991 bytes parent folder | download | duplicates (7)
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
56
57
#! /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