Added optional command parameter to restart apache function