projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1611 from stefanth/Collection3/graph-rendering-speedup
[collectd.git]
/
contrib
/
redhat
/
init.d-collectd
diff --git
a/contrib/redhat/init.d-collectd
b/contrib/redhat/init.d-collectd
index
4c69f3c
..
829eda5
100644
(file)
--- a/
contrib/redhat/init.d-collectd
+++ b/
contrib/redhat/init.d-collectd
@@
-42,7
+42,6
@@
check_config() {
return 0
}
return 0
}
-
start () {
echo -n $"Starting collectd: "
check_config
start () {
echo -n $"Starting collectd: "
check_config
@@
-58,6
+57,7
@@
start () {
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$service
fi
}
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$service
fi
}
+
stop () {
echo -n $"Stopping collectd: "
killproc -p $COLLECTDMONPID -d $MAXWAIT $prog
stop () {
echo -n $"Stopping collectd: "
killproc -p $COLLECTDMONPID -d $MAXWAIT $prog
@@
-65,6
+65,20
@@
stop () {
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$service
}
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$service
}
+
+restart () {
+ check_config
+ rc="$?"
+ if test "$rc" -ne 0; then
+ RETVAL=6
+ echo $"not restarting due to configuration error"
+ failure $"not restarting $service due to configuration error"
+ else
+ stop
+ start
+ fi
+}
+
# See how we were called.
case "$1" in
start)
# See how we were called.
case "$1" in
start)
@@
-77,16
+91,7
@@
case "$1" in
status -p $COLLECTDMONPID $prog
;;
restart|reload)
status -p $COLLECTDMONPID $prog
;;
restart|reload)
- check_config
- rc="$?"
- if test "$rc" -ne 0; then
- RETVAL=6
- echo $"not restarting due to configuration error"
- failure $"not restarting $service due to configuration error"
- else
- stop
- start
- fi
+ restart
;;
condrestart)
[ -f /var/lock/subsys/$service ] && restart || :
;;
condrestart)
[ -f /var/lock/subsys/$service ] && restart || :