summaryrefslogtreecommitdiff
path: root/init.d/20restore-etckeeper
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/20restore-etckeeper')
-rwxr-xr-xinit.d/20restore-etckeeper11
1 files changed, 11 insertions, 0 deletions
diff --git a/init.d/20restore-etckeeper b/init.d/20restore-etckeeper
new file mode 100755
index 0000000..984d521
--- /dev/null
+++ b/init.d/20restore-etckeeper
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+# Yes, this runs code from the repository. As documented, etckeeper-init
+# should only be run on repositories you trust.
+if [ -e .etckeeper ]; then
+ . ./.etckeeper
+else
+ touch .etckeeper
+ chmod 600 .etckeeper
+fi