30 lines
489 B
Bash
Executable File
30 lines
489 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /etc/init.d/init-functions
|
|
|
|
case "$1" in
|
|
start)
|
|
notify "Starting syslogd "
|
|
syslogd
|
|
check $?
|
|
;;
|
|
stop)
|
|
notify "Stopping syslogd "
|
|
if [ -f /var/run/syslogd.pid ]; then
|
|
kill $(cat /var/run/syslogd.pid)
|
|
check $?
|
|
rm /var/run/syslogd.pid &> /dev/null
|
|
else
|
|
notify "[$Red Syslogd is not running $Color_Off]\n"
|
|
fi
|
|
;;
|
|
restart|reload)
|
|
"$0" stop
|
|
"$0" start
|
|
;;
|
|
*)
|
|
echo "syslogd init script usage: $0 {start|stop|restart}"
|
|
return 1
|
|
esac
|
|
return $?
|