postfix-mailgraph/rc.postfix-mailgraph

Sun, 19 Apr 2009 14:07:25 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 19 Apr 2009 14:07:25 +0200
changeset 171
b72f2be1f619
child 193
9f27b979db4d
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

     1 #!@l_prefix@/bin/openpkg rc
     2 ##
     3 ##  rc.postfix-mailgraph -- Run-Commands
     4 ##
     6 %config
     7     postfix_mailgraph_enable="$openpkg_rc_def"
     9 %common
    10     postfix_mailgraph_pidfile="@l_prefix@/var/postfix-mailgraph/run/mailgraph.pid"
    11     postfix_mailgraph_signal () {
    12         [ -f $postfix_mailgraph_pidfile ] \
    13         && kill -$1 `cat $postfix_mailgraph_pidfile`
    14     }
    16 %status -u @l_susr@ -o
    17     postfix_mailgraph_usable="unknown"
    18     postfix_mailgraph_active="no"
    19     rcService postfix-mailgraph enable yes && \
    20         postfix_mailgraph_signal 0 && postfix_mailgraph_active="yes"
    21     echo "postfix_mailgraph_enable=\"$postfix_mailgraph_enable\""
    22     echo "postfix_mailgraph_usable=\"$postfix_mailgraph_usable\""
    23     echo "postfix_mailgraph_active=\"$postfix_mailgraph_active\""
    25 %start -u @l_susr@
    26     rcService postfix-mailgraph enable yes || exit 0
    27     rcService postfix-mailgraph active yes && exit 0
    28     @l_prefix@/sbin/mailgraph --daemon
    30 %stop -u @l_susr@
    31     rcService postfix-mailgraph enable yes || exit 0
    32     rcService postfix-mailgraph active no  && exit 0
    33     postfix_mailgraph_signal TERM
    35 %restart -u @l_susr@
    36     rcService postfix-mailgraph enable yes || exit 0
    37     rcService postfix-mailgraph active no  && exit 0
    38     postfix_mailgraph_signal TERM
    39     sleep 2
    40     @l_prefix@/sbin/mailgraph --daemon

mercurial