#! /Bin/bash # syslog starts syslogd/klogd. ### chkconfig: 2345 12 88 # Description: syslog is the facility by which when daemons use to log/# messages to various system log files. it is a good idea to always/# Run syslog. ### begin init info # provides: $ syslog ### end init info # source function library .. /etc/init. d/functions [-F/sbin/syslogd] | exit 0 [-F/sbin/klogd] | exit 0 # source configif [-F/etc/sysconfig/syslog]; then. /etc/sysconfig/syslogelsesyslogd_options = "-M 0" klogd_options = "-2" firetval = 0 umask 077 start () {echo-N $ "starting system logger: "daemon syslogd $ syslogd_optionsretval =$? Echoecho-N $ "Starting kernel logger:" daemon klogd $ klogd_optionsecho [$ retval-EQ 0] & Touch/var/lock/subsys/syslogreturn $ retval} STOP () {echo-N $ "shutting down kernel logger:" killproc klogdechoecho-N $ "shutting down system logger:" killproc syslogdretval =$? Echo [$ retval-EQ 0] & Rm-F/var/lock/subsys/syslogreturn $ retval} rhstatus () {status syslogdstatus klogd} restart () {stopstart} case "$1" in START) Start; stop) Stop; Status) rhstatus; restart | RELOAD) restart; condrestart) [-F/var/lock/subsys/syslog] & restart | :;; *) echo $ "Usage: $0 {START | stop | status | restart | condrestart} "Exit 1 esacexit $?