[MINOR] rhel init script : support the reload operation
The reload operation in the Red Hat init script caused a restart which is not always the best thing to do. Implement the reload.
This commit is contained in:
parent
2df8d713b3
commit
3909a2ab00
@ -71,6 +71,15 @@ restart() {
|
|||||||
start
|
start
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
/usr/sbin/$BASENAME -c -q -f /etc/$BASENAME/$BASENAME.cfg
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Errors found in configuration file, check it with '$BASENAME check'."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
/usr/sbin/$BASENAME -D -f /etc/$BASENAME/$BASENAME.cfg -p /var/run/$BASENAME.pid -sf $(cat /var/run/$BASENAME.pid)
|
||||||
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
/usr/sbin/$BASENAME -c -q -V -f /etc/$BASENAME/$BASENAME.cfg
|
/usr/sbin/$BASENAME -c -q -V -f /etc/$BASENAME/$BASENAME.cfg
|
||||||
}
|
}
|
||||||
@ -95,7 +104,7 @@ case "$1" in
|
|||||||
restart
|
restart
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
restart
|
reload
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart)
|
||||||
condrestart
|
condrestart
|
||||||
|
Loading…
x
Reference in New Issue
Block a user