systemd / active (exited)
Tom H
tomh0665 at gmail.com
Mon Sep 2 17:09:12 UTC 2019
On Mon, Sep 2, 2019 at 2:18 PM Helmut Schneider <jumper99 at gmx.de> wrote:
> Colin Watson wrote:
> > From: "Colin Watson" <cjwatson at ubuntu.com>
> > On Mon, Sep 02, 2019 at 11:19:04AM -0000, Helmut Schneider wrote:
> > > helmut at h2786452:~$ sudo systemctl show -p MainPID
> > > clamav-daemon-chroot.service
> > > MainPID=0
> > > helmut at h2786452:~$ pgrep clamd
> > > 3353
> > > helmut at h2786452:~$
> > >
> > > Any way to control MainPID?
> >
> > See my reply elsewhere in this thread suggesting switching to a native
> > systemd service for this.
>
> I'm open for improvements but I still haven't found a way to
>
> - provide variables (here $(id amavis)) in the service file
> - start something chrooted with systemd
>
> If I understood Tom correct "ExecStart=/usr/sbin/chroot something" will
> also fail.
I didn't say that.
The way that you chroot in a systemd unit is via "RootDirectory=". I'm
pretty sure that Colin W's unit had that. If you need to run something
in "ExecPre=" before chrooting, you have to add
"RootDirectoryStartOnly=yes".
You can set the user under which to run the service with "User=". I'm
pretty sure that Colin W's unit had that too.
More information about the ubuntu-users
mailing list