Dear Maintainer,
to reproduce, use the included conf file and start the systemwide snapclient.service
expected: service starts and runs
what happens: starts and deactivates
suspected cause: ExecStart=/usr/bin/snapclient --logsink=system $SNAPCLIENT_OPTS in snapclient.service
systemd doesn't do shell-like variable substitution, you'd need to start the process in a shell
systemd has instead has its own fixed set of %-'speciefiers' for substitution, defined in man systemd.unit
luckily, including the SNAPCLIENT_OPTS with the ExecStart= directive, is redundant, since snapclient
reads SNAPCLIENT_OPTS from its environment, and the EnvironmentFile=-/etc/default/snapclient directive
sources the environment from the conf file. Hence,
suggested patch: ExecStart=/usr/bin/snapclient --logsink=system , without the malformed variable
AFAICT, the bug affects not only this version
probably bad practice to mention two bugs in one report, but fwiw, snapclient apparantly also has a
non-robust way of managing its pidfile: running snapclient from the commandline as root once, then killing
it, can lead to Exception: Could not open PID lock file "/var/run/snapclient/pid" and failure of the
service later, alas, I'm failing to reproduce this now that I'd like to give exact steps