summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-18 18:32:06 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-19 12:22:14 +0200
commita4dddb777777995f70c85a6cbe956faa93b01ee4 (patch)
tree09a4dd404ab20f1401c7f5cfb86e6905d814170d
parentb9ba11b4db9c862ca1d2c90cafcf6495183619a9 (diff)
Add cron job for swclocksave
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
-rw-r--r--configure.ac1
-rw-r--r--services/Makemodule.am4
-rw-r--r--services/swclocksave.gcron.in3
3 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 84ab673..bde67a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,7 @@ AC_CONFIG_FILES([services/modules])
AC_CONFIG_FILES([services/hostapd])
AC_CONFIG_FILES([services/swclock])
AC_CONFIG_FILES([services/swclocksave])
+AC_CONFIG_FILES([services/swclocksave.gcron])
AC_CONFIG_FILES([services/nft])
AC_CONFIG_FILES([services/sshd])
AC_CONFIG_FILES([services/sshd_keygen])
diff --git a/services/Makemodule.am b/services/Makemodule.am
index ac297a6..5ca304c 100644
--- a/services/Makemodule.am
+++ b/services/Makemodule.am
@@ -10,6 +10,10 @@ init_DATA += services/network services/hostapd services/swclock
init_DATA += services/swclocksave services/nft services/sigkill
init_DATA += services/sshd services/sshd_keygen services/consolefont
+if GCROND
+init_DATA += services/swclocksave.gcron
+endif
+
if USYSLOGD
init_DATA += services/usyslogd
endif
diff --git a/services/swclocksave.gcron.in b/services/swclocksave.gcron.in
new file mode 100644
index 0000000..24e162b
--- /dev/null
+++ b/services/swclocksave.gcron.in
@@ -0,0 +1,3 @@
+interval hourly
+tty truncate @STATEFILESPATH@/swclock
+exec date --utc +%%m%%d%%H%%M%%Y.%%S