this is building on answers for Can systemd execute a command *before* a restart?
the current way to "start or restart" a service is:
systemctl is-active nginx && systemctl reload nginx || systemctl start nginx
I'm wondering if there's a better way using targets and such. I am having the feeling I am still trying to use systemd tooling as other init tools.
The case where i'd use this is after manual tweaks to the conf, which may work but crash during stress testing, and so i need to start or restart after new tweaks to the configuration file. Obviously the 'solution' here may be something that is not acceptable in production, as this is done on a vm/dev box.