Skip to main content

Runner

ServiceManager uses the runner package to generate systemd service file to manage Aos service instance lifetime cycle.

The next template is used for the generation:

[Unit]
Description=AOS Service
After=network.target

[Service]
Type=forking
Restart=always
ExecStartPre=/usr/bin/runc delete -f %i
ExecStart=/usr/bin/runc run -d --pid-file /run/aos/runtime/%i/.pid -b /run/aos/runtime/%i %i

ExecStop=/usr/bin/runc kill %i SIGKILL
ExecStopPost=/usr/bin/runc delete -f %i
PIDFile=/run/aos/runtime/%i/.pid
SuccessExitStatus=SIGKILL

[Install]
WantedBy=multi-user.target

Next parameters will be added to support service instance runtime failer state detection:

StartLimitIntervalSec=%s
StartLimitBurst=%d

[Service]
RestartSec=%s

Values of the parameters are taken form Aos service configuration runParameters field.