I’m wondering if there’s any way to start a systemd service from a PHP script. I have a web panel that multiple admins use and each of them need the convenient ability to start/stop/restart a systemd service.
I’ve done a ton of googling and I can find hundreds of topics about starting a PHP script from a systemd service but nothing in the other direction.
Have you thought about replacing systemd with a small “microserver” build in Golang (or other language) and just call this server and let this server do the task? I e make your own systemd?