diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/config.example.json | 6 | ||||
| -rw-r--r-- | examples/mattertimesync.service | 15 | ||||
| -rw-r--r-- | examples/mattertimesync.timer | 10 |
3 files changed, 31 insertions, 0 deletions
diff --git a/examples/config.example.json b/examples/config.example.json new file mode 100644 index 0000000..831630c --- /dev/null +++ b/examples/config.example.json @@ -0,0 +1,6 @@ +{ + "storagePath": "/var/lib/mattertimesync", + "timezone": "America/Chicago", + "logLevel": "info", + "fabricLabel": "Rust Matter Time Sync" +} diff --git a/examples/mattertimesync.service b/examples/mattertimesync.service new file mode 100644 index 0000000..8fc48c1 --- /dev/null +++ b/examples/mattertimesync.service @@ -0,0 +1,15 @@ +[Unit] +Description=Matter device clock synchronization +Wants=network-online.target +After=network-online.target time-sync.target + +[Service] +Type=oneshot +User=mattertimesync +Group=mattertimesync +ExecStart=/opt/mattertimesync/mattertimesync --config /etc/mattertimesync/config.json sync +NoNewPrivileges=true +PrivateTmp=true +ProtectSystem=strict +ProtectHome=true +ReadWritePaths=/var/lib/mattertimesync diff --git a/examples/mattertimesync.timer b/examples/mattertimesync.timer new file mode 100644 index 0000000..4d7b64a --- /dev/null +++ b/examples/mattertimesync.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Periodic Matter device clock synchronization + +[Timer] +OnBootSec=2min +OnUnitActiveSec=1h +RandomizedDelaySec=5min + +[Install] +WantedBy=timers.target |
