2

I, what happen's precisely when you run systemctl start apache2 (or other service) while service already started ?

Can it cause trouble to start several hundred times a day apache2 service? (to prevent the service from shutting down) or can it use memory or be dangerous?

4

Why don't you just use systemctl is-active to check whether it is running?

For example:

systemctl is-active --quiet apache2 || systemctl start apache2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.