I'm creating a C++ app that I'm running on a Red Hat Linux 8.0 box and am compiling with g++. I want to give the users several options, including one that says, "Restart the Apache service." I know how to restart a service at the command line, but how do I have a C++ program restart a service?
Any help would be appreciated. Thanks!