diff options
author | Andreas Unterkircher <unki@srv-vie-puppet.vie.mm-karton.com> | 2008-11-29 16:55:15 +0100 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.net> | 2017-10-19 06:43:47 +0200 |
commit | b9d1b238daca79ab68ede536a5439e8c09c9794f (patch) | |
tree | 3317b7b6d25b1f9d8434fadab1b98a7b37c0b427 | |
parent | d017bee0381c4d4c600d8fc0cc0f2b5ed1e3af82 (diff) | |
download | exilog-b9d1b238daca79ab68ede536a5439e8c09c9794f.zip exilog-b9d1b238daca79ab68ede536a5439e8c09c9794f.tar.gz exilog-b9d1b238daca79ab68ede536a5439e8c09c9794f.tar.bz2 |
pimp init script with /etc/default/exilog
Signed-off-by: Andreas Unterkircher <unki@srv-vie-puppet.vie.mm-karton.com>
-rw-r--r-- | debian/conffiles | 1 | ||||
-rw-r--r-- | debian/exilog.default | 4 | ||||
-rw-r--r-- | debian/exilog.init | 13 |
3 files changed, 10 insertions, 8 deletions
diff --git a/debian/conffiles b/debian/conffiles index d3e90e4..d11cbdc 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -1 +1,2 @@ etc/exilog/exilog.conf.dist +etc/default/exilog diff --git a/debian/exilog.default b/debian/exilog.default index 2b3637f..a0896a9 100644 --- a/debian/exilog.default +++ b/debian/exilog.default @@ -6,8 +6,8 @@ # This is a POSIX shell fragment # -# set to "yes", if agent shall get started -START_AGENT=no +# uncomment to enable the agent daemon +#START_AGENT=Yes # Additional options that are passed to the Daemon. DAEMON_OPTS="" diff --git a/debian/exilog.init b/debian/exilog.init index 2b72308..2a89366 100644 --- a/debian/exilog.init +++ b/debian/exilog.init @@ -22,21 +22,22 @@ if [ -f /etc/default/exilog ] ; then . /etc/default/exilog fi -test -z $START_AGENT && exit 0 - -if [ "$START_AGENT" != "yes" ]; then - exit 0 -fi - if [ ! -f /etc/exilog/exilog.conf ] ; then echo "create exilog.conf first!" exit 0 fi +# source lsb init-functions +. /lib/lsb/init-functions + set -e case "$1" in start) + # should we start a daemon at all? + test -z $START_AGENT && exit 0 + test "$START_AGENT" != "Yes" && exit 0 + log_daemon_msg "Starting $DESC" $NAME start-stop-daemon --start --quiet --pidfile /var/run/exilog/agent.pid \ --exec $DAEMON -- $DAEMON_OPTS |