-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add systemd service definitions for usage within yocto
- Loading branch information
1 parent
e953d59
commit 605d7e4
Showing
12 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# yaml-language-server: $schema=https://nfpm.goreleaser.com/static/schema.json | ||
--- | ||
name: tedge-systemd | ||
arch: all | ||
platform: linux | ||
version: ${SEMVER} | ||
release: ${RELEASE} | ||
section: misc | ||
priority: optional | ||
maintainer: thin-edge.io <thin-edge@thin-edge.io> | ||
description: thin-edge.io systemd service definitions | ||
vendor: thin-edge.io | ||
homepage: https://github.com/thin-edge/thin-edge.io | ||
license: Apache License 2.0 | ||
apk: | ||
# Use noarch instead of "all" | ||
arch: noarch | ||
contents: | ||
- src: ./services/systemd/system/* | ||
dst: /lib/systemd/system/ | ||
file_info: | ||
mode: 0644 | ||
|
||
- src: ./services/tedgectl | ||
dst: /usr/bin/ | ||
file_info: | ||
mode: 0755 | ||
|
||
- src: ./services/tedgectl_env | ||
dst: /etc/tedgectl/env | ||
type: config | ||
file_info: | ||
mode: 0644 | ||
|
||
# required otherwise the original dir permissions are overridden | ||
- dst: /etc/tedge | ||
type: dir | ||
file_info: | ||
owner: tedge | ||
mode: 0775 | ||
|
||
# exclude as thin-edge.io support systemd out of the box | ||
# - src: ./services/system.toml | ||
# dst: /etc/tedge/system.toml | ||
# type: config | ||
# file_info: | ||
# owner: tedge | ||
# mode: 0644 | ||
|
||
scripts: | ||
postinstall: ./packages/_scripts/postinstall.sh | ||
preremove: ./packages/_scripts/preremove.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=$DESCRIPTION | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=$COMMAND_USER | ||
RuntimeDirectory=$NAME | ||
ExecStart=$COMMAND $COMMAND_ARGS | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=Thin-edge device firmware management for Cumulocity | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=tedge | ||
RuntimeDirectory=c8y-firmware-plugin | ||
ExecStart=/usr/bin/c8y-firmware-plugin | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=tedge-agent is a thin-edge.io component to support operations | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=tedge | ||
RuntimeDirectory=tedge-agent | ||
ExecStart=/usr/bin/tedge-agent | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
14 changes: 14 additions & 0 deletions
14
services/systemd/system/tedge-configuration-plugin.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=Thin-edge device configuration management | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=root | ||
RuntimeDirectory=tedge-configuration-plugin | ||
ExecStart=/usr/bin/tedge-configuration-plugin | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=thin-edge.io log file retriever | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=root | ||
RuntimeDirectory=tedge-log-plugin | ||
ExecStart=/usr/bin/tedge-log-plugin | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=tedge-mapper-aws checks Thin Edge JSON measurements and forwards to AWS IoT Hub | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=tedge | ||
RuntimeDirectory=tedge-mapper-aws | ||
ExecStart=/usr/bin/tedge-mapper aws | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=tedge-mapper-az checks Thin Edge JSON measurements and forwards to Azure IoT Hub | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=tedge | ||
RuntimeDirectory=tedge-mapper-az | ||
ExecStart=/usr/bin/tedge-mapper az | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=tedge-mapper-c8y converts Thin Edge JSON measurements to Cumulocity JSON format | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=tedge | ||
RuntimeDirectory=tedge-mapper-c8y | ||
ExecStart=/usr/bin/tedge-mapper c8y | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=tedge-mapper-collectd converts Thin Edge JSON measurements to Cumulocity JSON format | ||
After=syslog.target network.target mosquitto.service | ||
|
||
[Service] | ||
User=tedge | ||
RuntimeDirectory=tedge-mapper-collectd | ||
ExecStart=/usr/bin/tedge-mapper collectd | ||
Restart=on-failure | ||
RestartPreventExitStatus=255 | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |