I need to manage the varnish service through an application in Golang, more specifically I need to have the application change the port, ip, storage method and etc. At first I started by following the official varnish documentation (https://varnish-cache.org/docs/trunk/tutorial/putting_varnish_on_port_80.html), so I did with that the application created the following file in the path: /etc/systemd/system/varnish.service.d/customexec.conf
[Service] ExecStart= ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret
There was no error, however, the service does not start In the service status it displays the following message:
● varnish.service - Varnish HTTP accelerator Loaded: loaded
(/lib/systemd/system/varnish.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/varnish.service.d
└─customexec.conf Active: inactive (dead) since Dom 2018-01-28 15:10:46 -03; 3h 56min ago
Docs: https://www.varnish-cache.org/docs/4.1/
man:varnishd Process: 970 ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S
/etc/varnish/secret (code=exited, status=0/SUCCESS) Main PID: 970
(code=exited, status=0/SUCCESS)
Is there another way to manage a service across an application?
Thank you all