summaryrefslogtreecommitdiff
path: root/packaging/connman-ntp.service
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/connman-ntp.service')
-rw-r--r--packaging/connman-ntp.service13
1 files changed, 13 insertions, 0 deletions
diff --git a/packaging/connman-ntp.service b/packaging/connman-ntp.service
new file mode 100644
index 00000000..6ca46e25
--- /dev/null
+++ b/packaging/connman-ntp.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Connman NTP service
+Requires=connman.service
+After=connman.service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/bash -c "dbus-send --system --type=method_call --print-reply --dest=net.connman / net.connman.Clock.SetProperty string:'TimeUpdates' variant:string:'auto'"
+ExecStop=/bin/bash -c "dbus-send --system --type=method_call --print-reply --dest=net.connman / net.connman.Clock.SetProperty string:'TimeUpdates' variant:string:'manual'"
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target