I need to check the output of apachectl configtest
in a bash script and restart if everything looks good without outputting the command to the screen
var =sudo apachectl configtest
If var contains "Syntax OK" then
sudo apachectl graceful
How to do it?