#!/bin/bash ### DO NOT EDIT THIS FILE ### if [ ! -f /home/aether/.ssh/aether ]; then echo "Need to have the aether key to run." exit fi cd /home/aether if [ $(ls ./aether-*.tar.gz | wc -l) -gt 7 ]; then rm $(ls -tr ./aether-*.tar.gz | head -n 1); fi export TARGET="aether-"$(date +%F)".tar.gz" printf "get /aether/aether.enc %s\nbye\n" $TARGET | sftp -o IdentityFile=./.ssh/aether aether@aninix.net rm -Rf target gunzip -c $TARGET | tar xvf - echo "Failsafe populated. Today\'s was saved to "$TARGET exit