systemd service files in the connectd package

The startup of the  connectd and connectd_schannel daemons is controlled by two systemd service files.

[Unit]
Description=Remote tcp connection service
Requires=rc-local.service
After=network.target rc-local.service

[Service]
RemainAfterExit=yes
ExecStart=/usr/bin/connectd_start
ExecStop=/usr/bin/connectd_stop
Restart=always
RestartSec=10s
TimeoutStartSec=0
StartLimitInterval=60s
StartLimitBurst=86400

[Install]
WantedBy=multi-user.target

 

[Unit]
Description=Remote tcp command service
Requires=rc-local.service
After=network.target rc-local.service

[Service]
RemainAfterExit=yes
ExecStart=/usr/bin/connectd_schannel start
ExecStop=/usr/bin/connectd_schannel stop
Restart=always
RestartSec=10s
TimeoutStartSec=0
StartLimitInterval=60s
StartLimitBurst=86400

[Install]
WantedBy=multi-user.target

Two things to note about both of these service files is that:

  • They require rc-local.service.
  • They wait until both network.service and rc-local.service are finished before executing the commands to start up the two connectd* daemons.

On a default Raspbian/RaspberryPi OS/Ubuntu OS image, this is not a problem because there is a blank rc-local.service present by default.  In general, rc-local.service is provided for OEM developers to add their own startup services for platform specific reasons.

However, on some OSes, rc-local.service is not present, which will prevent connectd daemons from launching.

To resolve this, edit both of the files above and change:

Requires=rc-local.service
After=network.target rc-local.service

to:

Requires=
After=network.target

 

Was this article helpful?
0 out of 0 found this helpful