rework our conditional reload script to handle systemctl reload changes
This commit is contained in:
parent
c5f9d31e06
commit
6c253445a3
1 changed files with 9 additions and 3 deletions
|
@ -10,9 +10,15 @@ rpm -q $PACKAGE
|
||||||
INSTALLED=$?
|
INSTALLED=$?
|
||||||
|
|
||||||
if [ $INSTALLED -eq 0 ]; then
|
if [ $INSTALLED -eq 0 ]; then
|
||||||
echo "Package $PACKAGE installed. Attempting reload of $SERVICE."
|
echo "Checking if $SERVICE is running"
|
||||||
/sbin/service $SERVICE reload
|
/sbin/service $SERVICE status >& /dev/null
|
||||||
exit $? # Exit with the /sbin/service status code
|
if [ $? == 0 ]; then
|
||||||
|
echo "Package $PACKAGE installed and running. Attempting reload of $SERVICE."
|
||||||
|
/sbin/service $SERVICE reload
|
||||||
|
exit $? # Exit with the /sbin/service status code
|
||||||
|
fi
|
||||||
|
echo "Package $PACKAGE is install, but $SERVICE is not running, skipping..."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If the package wasn't installed, then pretend everything is fine.
|
# If the package wasn't installed, then pretend everything is fine.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue