|
|
|
@ -6,14 +6,33 @@ |
|
|
|
%config |
|
|
|
%config |
|
|
|
postfix_mailgraph_enable="$openpkg_rc_def" |
|
|
|
postfix_mailgraph_enable="$openpkg_rc_def" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%common |
|
|
|
|
|
|
|
postfix_mailgraph_pidfile="@l_prefix@/var/postfix-mailgraph/run/mailgraph.pid" |
|
|
|
|
|
|
|
postfix_mailgraph_signal () { |
|
|
|
|
|
|
|
[ -f $postfix_mailgraph_pidfile ] \ |
|
|
|
|
|
|
|
&& kill -$1 `cat $postfix_mailgraph_pidfile` |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%status -p 200 -u @l_susr@ -o |
|
|
|
|
|
|
|
postfix_mailgraph_usable="unknown" |
|
|
|
|
|
|
|
postfix_mailgraph_active="no" |
|
|
|
|
|
|
|
rcService postfix_mailgraph enable yes && \ |
|
|
|
|
|
|
|
postfix_mailgraph_signal 0 && postfix_mailgraph_active="yes" |
|
|
|
|
|
|
|
echo "postfix_mailgraph_enable=\"$postfix_mailgraph_enable\"" |
|
|
|
|
|
|
|
echo "postfix_mailgraph_usable=\"$postfix_mailgraph_usable\"" |
|
|
|
|
|
|
|
echo "postfix_mailgraph_active=\"$postfix_mailgraph_active\"" |
|
|
|
|
|
|
|
|
|
|
|
%start -p 100 -u @l_susr@ |
|
|
|
%start -p 100 -u @l_susr@ |
|
|
|
rcService postfix_mailgraph enable yes || exit 0 |
|
|
|
rcService postfix_mailgraph enable yes || exit 0 |
|
|
|
@l_prefix@/sbin/mailgraph --daemon |
|
|
|
@l_prefix@/sbin/mailgraph --daemon |
|
|
|
|
|
|
|
|
|
|
|
%stop -p 200 -u @l_susr@ |
|
|
|
%stop -p 200 -u @l_susr@ |
|
|
|
rcService postfix_mailgraph enable yes || exit 0 |
|
|
|
rcService postfix_mailgraph enable yes || exit 0 |
|
|
|
if [ -f @l_prefix@/var/postfix-mailgraph/run/mailgraph.pid ]; then |
|
|
|
postfix_mailgraph_signal TERM |
|
|
|
kill -TERM `cat @l_prefix@/var/postfix-mailgraph/run/mailgraph.pid` >/dev/null 2>&1 || true |
|
|
|
|
|
|
|
sleep 2 |
|
|
|
%restart -p 200 -u @l_susr@ |
|
|
|
fi |
|
|
|
rcService postfix_mailgraph enable yes || exit 0 |
|
|
|
|
|
|
|
postfix_mailgraph_signal TERM |
|
|
|
|
|
|
|
sleep 2 |
|
|
|
|
|
|
|
@l_prefix@/sbin/mailgraph --daemon |
|
|
|
|
|
|
|
|
|
|
|
|