From 207bff9cb9773e3e0ef7fe7114e4b1aa70ffd4b6 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Tue, 28 Jul 2026 21:11:08 -0500 Subject: Rename mattertimesync role to mattertimectl (build + controller) - Rename role dir and all vars from mattertimesync to mattertimectl - Rename the server subrole to controller - Build via cargo instead of npm; run the binary directly (no node) - Default fabricLabel to "Matter Time Controller" --- mattertimectl/controller/templates/config.json.j2 | 6 ++++++ .../controller/templates/mattertimectl.service.j2 | 15 +++++++++++++++ mattertimectl/controller/templates/mattertimectl.timer.j2 | 10 ++++++++++ 3 files changed, 31 insertions(+) create mode 100644 mattertimectl/controller/templates/config.json.j2 create mode 100644 mattertimectl/controller/templates/mattertimectl.service.j2 create mode 100644 mattertimectl/controller/templates/mattertimectl.timer.j2 (limited to 'mattertimectl/controller/templates') diff --git a/mattertimectl/controller/templates/config.json.j2 b/mattertimectl/controller/templates/config.json.j2 new file mode 100644 index 0000000..34f319c --- /dev/null +++ b/mattertimectl/controller/templates/config.json.j2 @@ -0,0 +1,6 @@ +{ + "storagePath": "{{mattertimectl_storage_path}}", + "timezone": "{{mattertimectl_timezone}}", + "logLevel": "{{mattertimectl_log_level}}", + "fabricLabel": "{{mattertimectl_fabric_label}}" +} diff --git a/mattertimectl/controller/templates/mattertimectl.service.j2 b/mattertimectl/controller/templates/mattertimectl.service.j2 new file mode 100644 index 0000000..96cbeee --- /dev/null +++ b/mattertimectl/controller/templates/mattertimectl.service.j2 @@ -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={{mattertimectl_user}} +Group={{mattertimectl_user}} +ExecStart={{mattertimectl_install_dir}}/mattertimectl --config {{mattertimectl_config_dir}}/config.json sync +NoNewPrivileges=true +PrivateTmp=true +ProtectSystem=strict +ProtectHome=true +ReadWritePaths={{mattertimectl_storage_path}} diff --git a/mattertimectl/controller/templates/mattertimectl.timer.j2 b/mattertimectl/controller/templates/mattertimectl.timer.j2 new file mode 100644 index 0000000..a4242de --- /dev/null +++ b/mattertimectl/controller/templates/mattertimectl.timer.j2 @@ -0,0 +1,10 @@ +[Unit] +Description=Periodic Matter device clock synchronization + +[Timer] +OnBootSec={{mattertimectl_on_boot_sec}} +OnUnitActiveSec={{mattertimectl_on_active_sec}} +RandomizedDelaySec={{mattertimectl_randomized_delay_sec}} + +[Install] +WantedBy=timers.target -- cgit v1.2.3