1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/testing/inetutils-syslogd/inetutils-syslogd.initd
IT Offshore fb2496e8e0 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)
2013-11-15 15:56:53 +00:00

50 lines
1,008 B
Text

#!/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 $?
}