Skip to content

Commit

Permalink
Don't error out if foreman-maintain isn't installed. (#54)
Browse files Browse the repository at this point in the history
This is useful for pre-testing on a host without Satellite
  • Loading branch information
Mike McCune authored Jan 23, 2020
1 parent 176e995 commit 6a6c163
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions storage-benchmark
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ then
fi
fi


echo ""
echo "**** WARNING! We recommend you stop all Satellite 6 services to ensure no "
echo "interruption to critical processes."
Expand All @@ -124,20 +123,28 @@ echo "Do you wish to stop Satellite 6 services? (Y/N) "
read STOPSERVICES
if [[ $STOPSERVICES =~ ^[Yy]$ ]]
then
echo ""
echo "Stopping services."
echo ""
foreman-maintain service stop
if ! [ -x "$(command -v foreman-maintain)" ]; then
echo "foreman-maintain not installed. Continuing."
else
echo ""
echo "Stopping services."
echo ""
foreman-maintain service stop
fi
fi

testlocation

if [[ $STOPSERVICES =~ ^[Yy]$ ]]
then
echo ""
echo "Starting services."
echo ""
foreman-maintain service start
if ! [ -x "$(command -v foreman-maintain)" ]; then
echo "foreman-maintain not installed. Continuing."
else
echo ""
echo "Starting services."
echo ""
foreman-maintain service start
fi
fi

echo "Finished."

0 comments on commit 6a6c163

Please sign in to comment.