diff options
author | davidovski <david@davidovski.xyz> | 2022-03-29 23:36:22 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-03-29 23:36:22 +0100 |
commit | df88860947686a5e6507fc5d60ff33eac1158c6b (patch) | |
tree | d1dc7f2f003b08afb6d45f7170d7a0dd353060d3 /xi/init.d/sysklogd | |
parent | 33d239ecb3d66db2b005afbe68a7029c3f2d2ee0 (diff) |
Diffstat (limited to 'xi/init.d/sysklogd')
-rw-r--r-- | xi/init.d/sysklogd | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/xi/init.d/sysklogd b/xi/init.d/sysklogd new file mode 100644 index 0000000..e86b87b --- /dev/null +++ b/xi/init.d/sysklogd @@ -0,0 +1,79 @@ +#!/bin/sh +######################################################################## +# Begin sysklogd +# +# Description : Sysklogd loader +# +# Authors : Gerard Beekmans - gerard@linuxfromscratch.org +# DJ Lucas - dj@linuxfromscratch.org +# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org +# +# Version : LFS 7.0 +# +######################################################################## + +### BEGIN INIT INFO +# Provides: $syslog +# Required-Start: $first localnet +# Should-Start: +# Required-Stop: $local_fs +# Should-Stop: sendsignals +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts kernel and system log daemons. +# Description: Starts kernel and system log daemons. +# /etc/fstab. +# X-LFS-Provided-By: LFS +### END INIT INFO + +. /lib/lsb/init-functions + +case "${1}" in + start) + log_info_msg "Starting system log daemon..." + parms=${SYSKLOGD_PARMS-'-m 0'} + start_daemon /sbin/syslogd $parms + evaluate_retval + + log_info_msg "Starting kernel log daemon..." + start_daemon /sbin/klogd + evaluate_retval + ;; + + stop) + log_info_msg "Stopping kernel log daemon..." + killproc /sbin/klogd + evaluate_retval + + log_info_msg "Stopping system log daemon..." + killproc /sbin/syslogd + evaluate_retval + ;; + + reload) + log_info_msg "Reloading system log daemon config file..." + pid=`pidofproc syslogd` + kill -HUP "${pid}" + evaluate_retval + ;; + + restart) + ${0} stop + sleep 1 + ${0} start + ;; + + status) + statusproc /sbin/syslogd + statusproc klogd + ;; + + *) + echo "Usage: ${0} {start|stop|reload|restart|status}" + exit 1 + ;; +esac + +exit 0 + +# End sysklogd |