Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where to put daemontools startup in systemd Jessie?

175 views
Skip to first unread message

Steve Litt

unread,
Sep 20, 2014, 4:30:02 PM9/20/14
to
Hi all,

Right now I have the following at the bottom of my /etc/rc.local in
Wheezy:

csh -cf '/command/svscanboot &'

How would I accomplish that same thing in systemd-equipped Jessie? Note
that svscanboot is a Daemontools executable installed by make;make
install, not a package, so I'll personally need to do what's necessary
to run it at boot.

Thanks,

SteveT

Steve Litt * http://www.troubleshooters.com/
Troubleshooting Training * Human Performance


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140920160...@mydesq2.domain.cxm

Jonathan Dowland

unread,
Sep 20, 2014, 6:00:02 PM9/20/14
to
On Sat, Sep 20, 2014 at 04:02:44PM -0400, Steve Litt wrote:
> Hi all,
>
> Right now I have the following at the bottom of my /etc/rc.local in
> Wheezy:
>
> csh -cf '/command/svscanboot &'
>
> How would I accomplish that same thing in systemd-equipped Jessie?

You need to write a .service file for your svscanboot script, and put
it in /etc/systemd/user.

This is quite a good introduction to doing so:
http://0pointer.de/blog/projects/systemd-for-admins-3.html


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140920214058.GB5577@debian

Steve Litt

unread,
Sep 20, 2014, 6:40:01 PM9/20/14
to
On Sat, 20 Sep 2014 22:40:58 +0100
Jonathan Dowland <jm...@debian.org> wrote:

> On Sat, Sep 20, 2014 at 04:02:44PM -0400, Steve Litt wrote:
> > Hi all,
> >
> > Right now I have the following at the bottom of my /etc/rc.local in
> > Wheezy:
> >
> > csh -cf '/command/svscanboot &'
> >
> > How would I accomplish that same thing in systemd-equipped Jessie?
>
> You need to write a .service file for your svscanboot script, and put
> it in /etc/systemd/user.
>
> This is quite a good introduction to doing so:
> http://0pointer.de/blog/projects/systemd-for-admins-3.html

Thanks Jonathan,

That looks easy enough, although I'd have to put some thought into
After= and WantedBy=, assuming I use any WantedBy at all.

SteveT

Steve Litt * http://www.troubleshooters.com/
Troubleshooting Training * Human Performance


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140920182...@mydesq2.domain.cxm

Jonathan de Boyne Pollard

unread,
Sep 23, 2014, 3:30:04 PM9/23/14
to
Jonathan Dowland:
> You need to write a .service file for your svscanboot script, and
> put it in /etc/systemd/user.

I did systemd units for this ages ago. It's better to do this as two
units: a "path" unit that watches the service directory and a
"service" unit that is started when the service directory is found to
be non-empty. And one doesn't need svscanboot at all, since
systemd's journal logs the output of svscan and does it better than
readproctitle does.

There are minor variants on these in the nosh-systemd-services
package, which runs the nosh daemontools-compatibility scanner under
systemd in a similar (but not quite the same, since nosh has a
separate socket-activated service manager and a choice of service
scanners) manner. For more documentation, install the nosh-guide
package and read /usr/local/share/doc/nosh/svscan-startup.html .

jdebp /etc/systemd/system %cat svscan.path
[Unit]
Description=Daemontools service monitor

[Path]
DirectoryNotEmpty=/service/
Unit=svscan.service

[Install]
WantedBy=multi-user.target
jdebp /etc/systemd/system %cat svscan.service
[Unit]
Description=Daemontools service scanner

[Service]
ExecStart=/usr/bin/svscan /service/
Restart=always

[Install]


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/CACF=BdtUsyNskhgUeacWtAb6r+B6E7=TtwVRZBwW...@mail.gmail.com

Steve Litt

unread,
Sep 23, 2014, 8:00:02 PM9/23/14
to
On Tue, 23 Sep 2014 20:04:42 +0100
Jonathan de Boyne Pollard <j.deboynepoll...@ntlworld.com>
wrote:

> Jonathan Dowland:
> > You need to write a .service file for your svscanboot script, and
> > put it in /etc/systemd/user.
>
> I did systemd units for this ages ago. It's better to do this as two
> units: a "path" unit that watches the service directory and a
> "service" unit that is started when the service directory is found to
> be non-empty. And one doesn't need svscanboot at all, since
> systemd's journal logs the output of svscan and does it better than
> readproctitle does.

If the OP's intent was to remove as much as possible from systemd's
world, then he'll want systemd to run svscanboot, and let
svscanboot, svscan, svscan, and the various service processes operate as
designed. Also, daemontools logs aren't binary, which might be
something that influence's the OP's decision.

SteveT

Steve Litt * http://www.troubleshooters.com/
Troubleshooting Training * Human Performance


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140923193...@mydesq2.domain.cxm
0 new messages