In the second commit I made a change that allows the config file to have no log-files defined. As I'm only interested in errors (and restarts) and everything else can be controlled through the service definition or viewed through journalctl, this was quite a pain, esp. if the executable should be run as www-data.
Golang is not my main language, I hope I made no grave mistakes.
Hi, not sure it's still interesting to some, I made some small changes to allow for clean exists through OS signals.
Here is an example I use for myself on Ubuntu with systemd in /etc/systemd/system/app-queue.service:
Reloading, enabling and starting the new service:
In the second commit I made a change that allows the config file to have no log-files defined. As I'm only interested in errors (and restarts) and everything else can be controlled through the service definition or viewed through journalctl, this was quite a pain, esp. if the executable should be run as www-data.
Golang is not my main language, I hope I made no grave mistakes.