Making a shell script to enable/disable apache/mysql
I have my own website that hosted remotely, but I like to test out my scripts locally before I upload them.
I would like to make a shell script that acts like an on/off switch for apache/mysql.
something like this psuedocode:
if ( apache and mysql are running )
turn them off
turn them on
I know there's a way to do it, but I forgot almost everything from my Linux class.
So how would I go about making the script?