Running up to date Arch Linux ARMv7 (RaspPi 3). I have two systemd service units which I have created. I want foo
to start first and then bar
. foo
starts on boot and bar
does not. However bar
will start manually from a shell prompt. Here is a copy of the bar
unit file:
[Unit]
Requires=foo.service
After=foo.service
[Service]
Type=simple
ExecStart=/usr/bin/setsid /usr/bin/bar >/dev/null 2>&1 < /dev/null
TimeoutSec=0
RemainAfterExit=Yes
[Install]
WantedBy=getty.target
However if I put a pound symbol in front of [Unit]
like so:
#[Unit]
Then bar
starts at boot in the right order (after foo
).
This behaviour and commenting out of the [Unit]
line doesn't seem to make sense or fit in with the documentation I can find. So I'm just wondering why it makes the unit start at boot?!