Ben Harris writes ("Bug#1039361: SAUCE/systemd status"):
> [stuff]Thanks very much for the help. Your overall apporach seems reasoable. > sauce-run expects SAUCE_USER to specify what user to run SAUCE as, and I > think will default to root if it's not set. But the "stop" action of > sauce.init assumes when invoking start-stop-daemon that SAUCE is running > as "mail", which suggests that maybe any setting other than "mail" doesn't > work properly. This seems a likely bug. I may fix it. > systemd doesn't make it easy to extract the user to run > the service as from /etc/sauce/sys-config, so for now I've cheated and > hard-coded "mail" into systemd.service. The admin can override it using a > drop-in, but this would make upgrades a bit messy for people who set > SAUCE_USER to something other than "mail". Fair enough. > I've copied the code for waiting for SAUCE to start up from sauce.init > into sauce.service. This has not made it any less shonky. I think we should factor this out somewhere. We could make a separate small shell script? > I concur that wholesale conversion to "dh" is not necessary. I think you > added the call to dh_installsystemd in the wrong place (it should have > been before dh_installdeb), which probably didn't help. Oh! > Next I want to sort out some kind of tests for this, which will probably > be a bit harder. There is already an autopkgtest. It currently passes, under systemd, under autopkgtest-virt-qemu, using systemd's init script emulation. My branch contained an attempt to adjust the test so that it doesn't start sauce for the first time with the init script. The test doesn't test shutdown but it does test whole system reboot. I could probably write a shutdown test. Ian. -- Ian Jackson <[email protected]> These opinions are my own. Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.

