Files
Aether/aether.bash
T

18 lines
476 B
Bash
Raw Normal View History

2016-08-04 11:15:34 -05:00
#!/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-*.enc | wc -l) -gt 7 ]; then
rm $(ls -tr ./aether-*.enc | head -n 1);
2016-08-04 11:15:34 -05:00
fi
export TARGET="aether-"$(date +%F)".enc"
2016-08-04 11:15:34 -05:00
printf "get /aether/aether.enc %s\nbye\n" $TARGET | sftp -o IdentityFile=./.ssh/aether aether@aninix.net
echo "Aether copy populated. Today\'s was saved to "$TARGET
2016-08-04 11:15:34 -05:00
exit