summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-07-04 06:12:08 (GMT)
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-10-31 08:06:20 (GMT)
commitcdc8865c44bb77e9b7fa664a3669f84f7305718d (patch)
tree62dd390cc2894b6668d9d395f2e737132576cf78
parent88ec373b61d46ef46dcab48fe14d02ab7254763c (diff)
downloadconnman-cdc8865c44bb77e9b7fa664a3669f84f7305718d.zip
connman-cdc8865c44bb77e9b7fa664a3669f84f7305718d.tar.gz
connman-cdc8865c44bb77e9b7fa664a3669f84f7305718d.tar.bz2
Add systemd service to manager ConnMan NTP
-rw-r--r--packaging/40-connman-ntp.list1
-rw-r--r--packaging/connman-ntp.service13
2 files changed, 14 insertions, 0 deletions
diff --git a/packaging/40-connman-ntp.list b/packaging/40-connman-ntp.list
new file mode 100644
index 0000000..9b84282
--- /dev/null
+++ b/packaging/40-connman-ntp.list
@@ -0,0 +1 @@
+connman-ntp.service
diff --git a/packaging/connman-ntp.service b/packaging/connman-ntp.service
new file mode 100644
index 0000000..6ca46e2
--- /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