2011-04-25 15:37:00 +02:00
|
|
|
#!/bin/sh
|
2020-06-26 21:18:25 +02:00
|
|
|
# Start/stop/restart the system logging daemon.
|
2011-04-25 15:37:00 +02:00
|
|
|
#
|
|
|
|
# Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>.
|
|
|
|
|
2020-06-26 21:18:25 +02:00
|
|
|
# Source default settings:
|
|
|
|
if [ -r /etc/default/syslogd ]; then
|
|
|
|
. /etc/default/syslogd
|
|
|
|
fi
|
2016-06-30 22:26:57 +02:00
|
|
|
|
2011-04-25 15:37:00 +02:00
|
|
|
syslogd_start() {
|
2020-06-26 21:18:25 +02:00
|
|
|
if [ -x /usr/sbin/syslogd ]; then
|
2020-12-18 00:02:41 +01:00
|
|
|
echo "Starting syslogd daemon: /usr/sbin/syslogd ${SYSLOGD_OPTS}"
|
2020-06-26 21:18:25 +02:00
|
|
|
/usr/sbin/syslogd $SYSLOGD_OPTS
|
2011-04-25 15:37:00 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
syslogd_stop() {
|
2023-12-18 21:22:40 +01:00
|
|
|
killall --ns $$ -TERM syslogd 2> /dev/null
|
2011-04-25 15:37:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
syslogd_restart() {
|
|
|
|
syslogd_stop
|
2023-12-18 21:22:40 +01:00
|
|
|
timeout 1 pwait --ns $$ -U root -P 1 syslogd
|
2011-04-25 15:37:00 +02:00
|
|
|
syslogd_start
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
'start')
|
|
|
|
syslogd_start
|
|
|
|
;;
|
|
|
|
'stop')
|
|
|
|
syslogd_stop
|
|
|
|
;;
|
|
|
|
'restart')
|
|
|
|
syslogd_restart
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "usage $0 start|stop|restart"
|
|
|
|
esac
|