summaryrefslogtreecommitdiff
path: root/net-misc/tlsdate/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/tlsdate/files')
-rw-r--r--net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch22
-rw-r--r--net-misc/tlsdate/files/tlsdate.confd8
-rw-r--r--net-misc/tlsdate/files/tlsdate.rc16
-rw-r--r--net-misc/tlsdate/files/tlsdated.confd15
-rw-r--r--net-misc/tlsdate/files/tlsdated.default4
-rw-r--r--net-misc/tlsdate/files/tlsdated.rc18
-rw-r--r--net-misc/tlsdate/files/tlsdated.tmpfiles.conf1
7 files changed, 84 insertions, 0 deletions
diff --git a/net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch b/net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch
new file mode 100644
index 000000000000..df03833f7cd5
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch
@@ -0,0 +1,22 @@
+From: Dominik Kriegner <dominik.kriegner@gmail.com>
+Date: Tue, 26 Jan 2016 12:12:26 +0000
+Subject: [PATCH] Fix systemd unit file
+
+Project-Bug-URL: https://github.com/ioerror/tlsdate/pull/162
+Gentoo-Bug-URL: https://bugs.gentoo.org/533380
+
+--- a/systemd/tlsdated.service
++++ b/systemd/tlsdated.service
+@@ -5,6 +5,9 @@ After=network.target
+ [Service]
+ Type=simple
+ EnvironmentFile=/etc/default/tlsdated
+-ExecStart=/usr/sbin/tlsdated ${DAEMON_OPTS}
+-ExecReload=/bin/kill -HUP ${MAINPID}
+-ExecStop=/bin/kill -INT ${MAINPID}
++ExecStart=/usr/sbin/tlsdated $DAEMON_OPTS
++ExecReload=/bin/kill -HUP $MAINPID
++ExecStop=/bin/kill -INT $MAINPID
++
++[Install]
++WantedBy=multi-user.target
diff --git a/net-misc/tlsdate/files/tlsdate.confd b/net-misc/tlsdate/files/tlsdate.confd
new file mode 100644
index 000000000000..2d7ed030de33
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate.confd
@@ -0,0 +1,8 @@
+# config file for /etc/init.d/tlsdate
+
+# Command to execute to set the time.
+# This are some common tlsdate options:
+# -l: leap (set time regardless of difference)
+# -H: hostname to sync with
+# -x: proxy URL
+TLSDATE_OPTS="-l -H www.google.com"
diff --git a/net-misc/tlsdate/files/tlsdate.rc b/net-misc/tlsdate/files/tlsdate.rc
new file mode 100644
index 000000000000..3c5163ac92b5
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate.rc
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="set time once when started"
+
+depend() {
+ use net
+}
+
+start() {
+ : ${TLSDATE_CMD:=tlsdate}
+ ebegin "Setting clock via tlsdate '${TLSDATE_CMD}'"
+ "${TLSDATE_CMD}" ${TLSDATE_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/net-misc/tlsdate/files/tlsdated.confd b/net-misc/tlsdate/files/tlsdated.confd
new file mode 100644
index 000000000000..d257289cc58d
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.confd
@@ -0,0 +1,15 @@
+# config file for /etc/init.d/tlsdated
+
+# Command to execute to set the time.
+# This are some common tlsdate options:
+# -l: leap (set time regardless of difference)
+# -H: hostname to sync with
+# -x: proxy URL
+TLSDATED_CMD="/usr/bin/tlsdate -l -H www.google.com"
+
+# Additional options; see `man tlsdated` for reference.
+TLSDATED_OPTS=""
+
+# Cache dir. Probably don't need to change this.
+# It matches the compiled-in default.
+TLSDATED_CACHE_DIR="/var/cache/tlsdated"
diff --git a/net-misc/tlsdate/files/tlsdated.default b/net-misc/tlsdate/files/tlsdated.default
new file mode 100644
index 000000000000..08186f75ef31
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.default
@@ -0,0 +1,4 @@
+# defaults file for /etc/default/tlsdated
+
+# Additional options; see `man tlsdated` for reference.
+DEAMON_OPTS=""
diff --git a/net-misc/tlsdate/files/tlsdated.rc b/net-misc/tlsdate/files/tlsdated.rc
new file mode 100644
index 000000000000..d0814c874b4e
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.rc
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="start a daemon to continuously set time via a helper"
+
+command="tlsdated"
+command_args="${TLSDATED_OPTS} -- ${TLSDATED_CMD}"
+command_background="true"
+pidfile="/var/run/${SVCNAME}.pid"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0700 -o tlsdate:tlsdate "${TLSDATED_CACHE_DIR}"
+}
diff --git a/net-misc/tlsdate/files/tlsdated.tmpfiles.conf b/net-misc/tlsdate/files/tlsdated.tmpfiles.conf
new file mode 100644
index 000000000000..07a7966cc873
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.tmpfiles.conf
@@ -0,0 +1 @@
+d /var/cache/tlsdated 0700 tlsdate tlsdate -