mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-02 16:07:42 +00:00
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,21 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
|
||||||
# Starts rsyslog.
|
|
||||||
#
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
echo -n "Starting rsyslog daemon: "
|
echo -n "Starting rsyslog daemon: "
|
||||||
umask 077
|
umask 077
|
||||||
start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
|
start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
|
||||||
echo "OK"
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
echo -n "Stopping rsyslog daemon: "
|
echo -n "Stopping rsyslog daemon: "
|
||||||
start-stop-daemon -K -q -p /var/run/rsyslogd.pid
|
start-stop-daemon -K -q -p /var/run/rsyslogd.pid
|
||||||
echo "OK"
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||||
}
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
stop
|
stop
|
||||||
|
sleep 1
|
||||||
start
|
start
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,4 +35,3 @@ case "$1" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user