summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord. johnson <fenris02@fedoraproject.org>2015-02-28 22:32:58 -0600
committerd. johnson <fenris02@fedoraproject.org>2015-02-28 22:32:58 -0600
commit42d2e9255f90da63ed8b1b29ef4bd4f4847f82c8 (patch)
tree1c056160bf36e3eb51c19d1af25bfd7d53ecb8c4
parent181f2b683922c6cab3f68ec9bafd43e17edaad0e (diff)
downloadcleanup-42d2e9255f90da63ed8b1b29ef4bd4f4847f82c8.tar.gz
cleanup-42d2e9255f90da63ed8b1b29ef4bd4f4847f82c8.tar.xz
cleanup-42d2e9255f90da63ed8b1b29ef4bd4f4847f82c8.zip
Ensure that gpg + rng are installed
-rwxr-xr-xduplicity-backups.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/duplicity-backups.sh b/duplicity-backups.sh
index 91d7794..f033de4 100755
--- a/duplicity-backups.sh
+++ b/duplicity-backups.sh
@@ -70,6 +70,15 @@ fi
# Setting the pass phrase to encrypt the backup files.
export PASSPHRASE=$(/bin/cat /root/.passphrase |/usr/bin/sha512sum |/bin/awk '{print$1}')
+if [ \! -x /usr/bin/gpg ]; then
+ /usr/bin/yum install -y gnupg2
+fi
+if [ \! -x /sbin/rngd ]; then
+ /usr/bin/yum install -y rng-tools
+ /sbin/chkconfig rngd on
+ /sbin/service rngd start
+fi
+
# Create gnupg keys if they do not already exist
if [ ! -e /root/.gnupg ]; then
[ -d /root/tmp ] || install -d -m 0700 -o 0 -g 0 /root/tmp