Restarting and Monitoring a systemd service from golang with coreos/go-systemd

I&rsquo;m current working on code which lives in an agent, written in golang , which is running on a fleet of machines. The agent needs to, when a new version of an application is deployed, restart the systemd unit and make sure it comes up healthy and running. Here is the output of what we&rsquo;re going to build: ☠️ Dead-end: Try calling systemctl and parse the stdout This is the most obvious…