diff options
author | IT Offshore <developer@it-offshore.co.uk> | 2013-11-10 09:59:00 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-15 15:56:53 +0000 |
commit | fb2496e8e08eec0708272fa1fd13bf0174250b95 (patch) | |
tree | 9e2ae87bd03d9662fa591d7cf2b963fd39f34eb5 /testing/inetutils-syslogd/inetutils-syslogd.initd | |
parent | eadf0256139ab6119be9dcc04df58ac4bef2918a (diff) | |
download | aports-fb2496e8e08eec0708272fa1fd13bf0174250b95.tar.bz2 aports-fb2496e8e08eec0708272fa1fd13bf0174250b95.tar.xz |
testing/inetutils-syslogd: new aport
A small syslogd for logging to multiple files
http://www.gnu.org/software/inetutils/
revised complete patch for inetutils-syslogd.
post-install - just gives status / info message - configuration is
now done by /sbin/setup-inetutils-syslogd. Both scripts now use the
system colours $STRONG $RED $GREEN.
post-deinstall - just adds back busybox syslog to boot runlevel &
shows the status of syslog & cron (as cron will be stopped by removing
any syslog)
Diffstat (limited to 'testing/inetutils-syslogd/inetutils-syslogd.initd')
-rw-r--r-- | testing/inetutils-syslogd/inetutils-syslogd.initd | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/inetutils-syslogd/inetutils-syslogd.initd b/testing/inetutils-syslogd/inetutils-syslogd.initd new file mode 100644 index 0000000000..6baad86dd7 --- /dev/null +++ b/testing/inetutils-syslogd/inetutils-syslogd.initd @@ -0,0 +1,50 @@ +#!/sbin/runscript + +# This file is part of inetutils-syslogd +# Created for Alpine Linux by IT Offshore <developer@it-offshore.co.uk> + +name=syslogd +daemon=/usr/sbin/$name +config_file="/etc/syslog.conf" + +depend() { + need clock hostname localmount + provide logger +} + +check_config() { + [ -f "$config_file" ] || error "$config_file is missing" +} + +start_pre() { + check_config || return 1 +} + +start() { + ebegin "Starting ${name}" + start-stop-daemon --start --quiet \ + --pidfile /var/run/${name}.pid \ + --exec ${daemon} -- ${SYSLOGD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/$name.pid \ + --exec ${daemon} + eend $? +} + +reload() { + if [ ! -f "${PIDFILE}" ]; then + eerror "rsyslogd not running" + return 1 + fi + + ebegin "Re-opening intetutils-syslogd log files" + start-stop-daemon --stop --signal HUP \ + --pidfile /var/run/$name.pid + eend $? +} + |