I wonder if it is possible to check whether or not apache2 is running. If it is not running I want to execute it using shellscript
Currently I have added a function which I named run_apache which simply goes to the directory with apache2 starts it. I have added this function to my
.bashrc file. It will however execute everytime I open a new shell, which I don't want to unless apache2 is not running already.