Here is my boondocks-agent.service file. I have installed it in /lib/systemd/system:
[Unit]
Description=Boondocks agent
Requires=\
balena.service
After=\
balena.service
[Service]
Type=simple
Restart=always
RestartSec=10s
WatchdogSec=60
EnvironmentFile=/etc/boondocks-agent/agent.conf
EnvironmentFile=-/tmp/boondocks-agent.conf
ExecStartPre=-/usr/bin/stop-boondocks-agent
ExecStart=/usr/bin/healthdog --healthcheck=/usr/lib/boondocks-agent/boondocks-agent-healthcheck /usr/bin/start-boondocks-agent
ExecStop=-/usr/bin/stop-boondocks-agent
[Install]
WantedBy=multi-user.target
It doesn't appear to start up when I boot the system. After a clean boot, this is what I see for status:
systemctl status boondocks-agent
boondocks-agent.service - Boondocks agent
Loaded: loaded (/lib/systemd/system/boondocks-agent.service; disabled; vendor preset: enabled)
Active: inactive (dead)
What do I have to do to make this start up automatically on boot?
Edit
In YOCTO, the equivalent to calling systemctl enable
is:
SYSTEMD_SERVICE_${PN} = " \
boondocks-agent.service
"
Best Answer
You need to enable it a boot time:
systemctl enable boondocks-agent