rsyslog: clean up sysv initscript
Fix indentation, remove redundant comment, print real start/stop status. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
3f74996c1e
commit
7ffa7389af
@ -1,38 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Starts rsyslog.
|
||||
#
|
||||
|
||||
start() {
|
||||
echo -n "Starting rsyslog daemon: "
|
||||
umask 077
|
||||
start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
|
||||
echo "OK"
|
||||
echo -n "Starting rsyslog daemon: "
|
||||
umask 077
|
||||
start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping rsyslog daemon: "
|
||||
start-stop-daemon -K -q -p /var/run/rsyslogd.pid
|
||||
echo "OK"
|
||||
echo -n "Stopping rsyslog daemon: "
|
||||
start-stop-daemon -K -q -p /var/run/rsyslogd.pid
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user