Skip to main content
Version: 0.13.1

Init System Configuration File

To support multiple init systems and service managers, tedge requires the /etc/tedge/system.toml file. The file contains configurations about the init system and the supported actions.

The format of the file is:

file: /etc/tedge/system.toml
[init]
name = "systemd"
is_available = ["/bin/systemctl", "--version"]
restart = ["/bin/systemctl", "restart", "{}"]
stop = ["/bin/systemctl", "stop", "{}"]
enable = ["/bin/systemctl", "enable", "{}"]
disable = ["/bin/systemctl", "disable", "{}"]
is_active = ["/bin/systemctl", "is-active", "{}"]
info

For security reasons, the system.toml file should not be writable by non-root users. The permissions on the file can be set using the following command:

sudo chmod 644 /etc/tedge/system.toml

Placeholder​

{} will be replaced by a service name (mosquitto, tedge-mapper-c8y, tedge-mapper-az, tedge-mapper-aws, etc.). For example,

restart = ["/bin/systemctl", "restart", "{}"]

will be interpreted as

/bin/systemctl restart mosquitto

Keys​

PropertyDescription
nameAn identifier of the init system. It is used in the output of tedge connect and tedge disconnect
is_availableThe command to check if the init is available on your system
restartThe command to restart a service by the init system
stopThe command to stop a service by the init system
enableThe command to enable a service by the init system
disableThe command to disable a service by the init system
is_activeThe command to check if the service is running by the init system

Default settings​

If the system.toml file does not exist, then thin-edge will assume that you are using Systemd, and use /bin/systemctl to control the services.