aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-03-08 13:40:59 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-03-08 13:40:59 +1300
commitf79da819f0463f6fa54bc602dfed1b21f5213933 (patch)
tree23572cf61c625e525ad824ac2580df17653b5e17
parentRemove useless variable init (diff)
downloadMail-Run-Crypt-f79da819f0463f6fa54bc602dfed1b21f5213933.tar.gz
Mail-Run-Crypt-f79da819f0463f6fa54bc602dfed1b21f5213933.zip
Add croncryptsh
-rw-r--r--README.markdown16
-rwxr-xr-xbin/croncryptsh3
2 files changed, 19 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index ab795e4..75155b6 100644
--- a/README.markdown
+++ b/README.markdown
@@ -8,6 +8,7 @@ sending them to the `MAILTO` destination.
CRONCRYPT_KEYID=0x0A1B2C3D4E5F6G7H
CRONCRYPT_PASSPHRASE=hibbityboo
MAILTO=me@mynet
+
0 1 * * * croncrypt rsync /home/tom/important-file /home/backups
The main design goal is simplicity; just whack `croncrypt` in front of all your
@@ -15,6 +16,21 @@ The main design goal is simplicity; just whack `croncrypt` in front of all your
redirects, in which case you should consider putting it all into a script file
anyway.
+As an alternative, to apply this to all of the tasks in that `crontab(5)` file,
+you can specify `SHELL` with a fully-qualified path to the `croncryptsh`
+executable:
+
+ $ crontab -l
+ CRONCRYPT_KEYID=0x0A1B2C3D4E5F6G7H
+ CRONCRYPT_PASSPHRASE=hibbityboo
+ MAILTO=me@mynet
+ SHELL=$HOME/.local/bin/croncryptsh
+
+ 0 1 * * * rsync /home/tom/important-file-1 /home/backups
+ 0 2 * * * rsync /home/tom/important-file-2 /home/backups
+
+This is the method the author prefers.
+
Don’t use your own GPG key for signing! I recommend you create a dedicated key
just for Croncrypt, and sign it locally with `gpg --lsign` so that your
software trusts it locally.
diff --git a/bin/croncryptsh b/bin/croncryptsh
new file mode 100755
index 0000000..2c25fd6
--- /dev/null
+++ b/bin/croncryptsh
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec croncrypt sh "$@"
+