postfix-mailgraph/rc.postfix-mailgraph

changeset 439
085c98460a58
parent 171
b72f2be1f619
equal deleted inserted replaced
0:ebaab19ba852 1:ba520cd64f30
3 ## rc.postfix-mailgraph -- Run-Commands 3 ## rc.postfix-mailgraph -- Run-Commands
4 ## 4 ##
5 5
6 %config 6 %config
7 postfix_mailgraph_enable="$openpkg_rc_def" 7 postfix_mailgraph_enable="$openpkg_rc_def"
8 postfix_mailgraph_flags=""
8 9
9 %common 10 %common
10 postfix_mailgraph_pidfile="@l_prefix@/var/postfix-mailgraph/run/mailgraph.pid" 11 postfix_mailgraph_pidfile="@l_prefix@/var/postfix-mailgraph/run/mailgraph.pid"
11 postfix_mailgraph_signal () { 12 postfix_mailgraph_signal () {
12 [ -f $postfix_mailgraph_pidfile ] \ 13 [ -f $postfix_mailgraph_pidfile ] \
23 echo "postfix_mailgraph_active=\"$postfix_mailgraph_active\"" 24 echo "postfix_mailgraph_active=\"$postfix_mailgraph_active\""
24 25
25 %start -u @l_susr@ 26 %start -u @l_susr@
26 rcService postfix-mailgraph enable yes || exit 0 27 rcService postfix-mailgraph enable yes || exit 0
27 rcService postfix-mailgraph active yes && exit 0 28 rcService postfix-mailgraph active yes && exit 0
28 @l_prefix@/sbin/mailgraph --daemon 29 @l_prefix@/sbin/mailgraph --daemon ${postfix_mailgraph_flags}
29 30
30 %stop -u @l_susr@ 31 %stop -u @l_susr@
31 rcService postfix-mailgraph enable yes || exit 0 32 rcService postfix-mailgraph enable yes || exit 0
32 rcService postfix-mailgraph active no && exit 0 33 rcService postfix-mailgraph active no && exit 0
33 postfix_mailgraph_signal TERM 34 postfix_mailgraph_signal TERM
34 35
35 %restart -u @l_susr@ 36 %restart -u @l_susr@
36 rcService postfix-mailgraph enable yes || exit 0 37 rcService postfix-mailgraph enable yes || exit 0
37 rcService postfix-mailgraph active no && exit 0 38 rcService postfix-mailgraph active no && exit 0
38 postfix_mailgraph_signal TERM 39 rc postfix-mailgraph stop
39 sleep 2 40 sleep 2
40 @l_prefix@/sbin/mailgraph --daemon 41 rc postfix-mailgraph start
41 42

mercurial