18 lines
476 B
Bash
Executable File
18 lines
476 B
Bash
Executable File
#!/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);
|
|
fi
|
|
export TARGET="aether-"$(date +%F)".enc"
|
|
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
|
|
exit
|