Fixes for makefile and aether.bash -- deduplicate the right files.
This commit is contained in:
parent
0b7c6305e1
commit
751925085e
5
Makefile
5
Makefile
@ -8,7 +8,10 @@ client: user aether.bash
|
|||||||
chown aether /home/aether/aether.bash
|
chown aether /home/aether/aether.bash
|
||||||
chmod 0700 /home/aether/aether.bash
|
chmod 0700 /home/aether/aether.bash
|
||||||
/home/aether/aether.bash
|
/home/aether/aether.bash
|
||||||
echo '0 1 * * * /home/aether/aether.bash &>> /var/log/aether.log' | su cford -c "crontab"
|
crontab -l > /tmp/cronie
|
||||||
|
grep aether.bash /tmp/cronie || echo '0 1 * * * /home/aether/aether.bash &>> /var/log/aether.log' >> /tmp/cronie
|
||||||
|
crontab /tmp/cronie
|
||||||
|
rm /tmp/cronie
|
||||||
touch /var/log/aether.log
|
touch /var/log/aether.log
|
||||||
chown aether:aether /var/log/aether.log
|
chown aether:aether /var/log/aether.log
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ if [ ! -f /home/aether/.ssh/aether ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
cd /home/aether
|
cd /home/aether
|
||||||
if [ $(ls ./aether-*.tar.gz | wc -l) -gt 7 ]; then
|
if [ $(ls ./aether-*.enc | wc -l) -gt 7 ]; then
|
||||||
rm $(ls -tr ./aether-*.tar.gz | head -n 1);
|
rm $(ls -tr ./aether-*.enc | head -n 1);
|
||||||
fi
|
fi
|
||||||
export TARGET="aether-"$(date +%F)".enc"
|
export TARGET="aether-"$(date +%F)".enc"
|
||||||
printf "get /aether/aether.enc %s\nbye\n" $TARGET | sftp -o IdentityFile=./.ssh/aether aether@aninix.net
|
printf "get /aether/aether.enc %s\nbye\n" $TARGET | sftp -o IdentityFile=./.ssh/aether aether@aninix.net
|
||||||
|
Loading…
Reference in New Issue
Block a user