diff options
author | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-07-04 14:12:08 +0800 |
---|---|---|
committer | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-10-31 16:06:20 +0800 |
commit | cdc8865c44bb77e9b7fa664a3669f84f7305718d (patch) | |
tree | 62dd390cc2894b6668d9d395f2e737132576cf78 | |
parent | 88ec373b61d46ef46dcab48fe14d02ab7254763c (diff) | |
download | connman-cdc8865c44bb77e9b7fa664a3669f84f7305718d.tar.gz connman-cdc8865c44bb77e9b7fa664a3669f84f7305718d.tar.bz2 connman-cdc8865c44bb77e9b7fa664a3669f84f7305718d.zip |
Add systemd service to manager ConnMan NTP
-rw-r--r-- | packaging/40-connman-ntp.list | 1 | ||||
-rw-r--r-- | packaging/connman-ntp.service | 13 |
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 00000000..9b842821 --- /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 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 |