diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-10-07 19:32:06 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-10-07 19:32:06 -0300 |
commit | 0d6bcb2b7d08e3a41481372c1ae0d11868d88b1b (patch) | |
tree | d4429ce3a62e9cb5d095ad567b5f821d99a7b9f5 /templates/vserver/files/etc/rc.d/rc.syslog | |
parent | 5bfb15bdbedbc7273a283d611c84ed1cf401011b (diff) | |
download | simplepkg-0d6bcb2b7d08e3a41481372c1ae0d11868d88b1b.tar.gz simplepkg-0d6bcb2b7d08e3a41481372c1ae0d11868d88b1b.tar.bz2 |
New repo layout with git migration
Diffstat (limited to 'templates/vserver/files/etc/rc.d/rc.syslog')
-rwxr-xr-x | templates/vserver/files/etc/rc.d/rc.syslog | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/templates/vserver/files/etc/rc.d/rc.syslog b/templates/vserver/files/etc/rc.d/rc.syslog new file mode 100755 index 0000000..a005fb7 --- /dev/null +++ b/templates/vserver/files/etc/rc.d/rc.syslog @@ -0,0 +1,42 @@ +#!/bin/sh +# Start/stop/restart the system logging daemons. +# +# Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>. + +syslogd_start() { + if [ -x /usr/sbin/syslogd -a -x /usr/sbin/klogd ]; then + echo -n "Starting sysklogd daemons: " + echo -n "/usr/sbin/syslogd " + /usr/sbin/syslogd + sleep 1 # prevent syslogd/klogd race condition on SMP kernels + echo "/usr/sbin/klogd -c 3 -x" + # '-c 3' = display level 'error' or higher messages on console + # '-x' = turn off broken EIP translation + /usr/sbin/klogd -c 3 -x + fi +} + +syslogd_stop() { + killall syslogd 2> /dev/null + killall klogd 2> /dev/null +} + +syslogd_restart() { + syslogd_stop + sleep 1 + syslogd_start +} + +case "$1" in +'start') + syslogd_start + ;; +'stop') + syslogd_stop + ;; +'restart') + syslogd_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac |