From f79da819f0463f6fa54bc602dfed1b21f5213933 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 8 Mar 2016 13:40:59 +1300 Subject: Add croncryptsh --- README.markdown | 16 ++++++++++++++++ bin/croncryptsh | 3 +++ 2 files changed, 19 insertions(+) create mode 100755 bin/croncryptsh 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 "$@" + -- cgit v1.2.3