Start services automatically (Autostart)

This section shows how to start applications and services automatically after booting. A suitable entry in the /etc/rc.conf file is required at TwinCAT/BSD. The Mosquitto MQTT broker is shown as an example.

The /etc/rc.conf file generally contains information about the system configuration such as the local host name, configuration details for possible network interfaces and which services should be started when the system starts up.

This step works only with applications and services that bring appropriate rc scripts to be started as a service or daemon. The scripts are stored at /etc/rc.d. For your own applications without such rc scripts, there is further information on how to create these rc scripts at https://docs.freebsd.org/en/articles/rc-scripting/.

Requirements:

Proceed as follows:

1. Enter the doas ee /etc/rc.conf command in the console.
The rc.conf file opens.
2. In the editor navigate to the end of the file and create the following entry:
mosquitto_enable="YES"
3. Press [Esc] and save the changes.
The Mosquitto MQTT broker is automatically started at the next system startup.