2016-08-04 11:15:34 -05:00
|
|
|
SHELL := /bin/bash
|
2016-11-09 22:29:17 -06:00
|
|
|
BACKUPDIR := /usr/local/backup
|
2016-08-04 11:15:34 -05:00
|
|
|
|
2016-09-21 21:43:35 -05:00
|
|
|
compile:
|
|
|
|
pacman -S openssl gzip tar openssh
|
|
|
|
make keys
|
|
|
|
|
|
|
|
install:
|
2016-08-04 11:15:34 -05:00
|
|
|
@echo You must specify client or server in a call to make.
|
|
|
|
|
|
|
|
client: user aether.bash
|
|
|
|
cp aether.bash /home/aether/aether.bash
|
|
|
|
chown aether /home/aether/aether.bash
|
|
|
|
chmod 0700 /home/aether/aether.bash
|
|
|
|
/home/aether/aether.bash
|
2016-08-10 12:44:54 -05:00
|
|
|
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
|
2016-08-04 11:15:34 -05:00
|
|
|
touch /var/log/aether.log
|
|
|
|
chown aether:aether /var/log/aether.log
|
|
|
|
|
2016-09-21 21:43:35 -05:00
|
|
|
server: scripts user ./aether-gen.bash ./aether.pub ./server-backup
|
2016-08-04 11:15:34 -05:00
|
|
|
bash ./aether-gen.bash
|
|
|
|
cp ./aether.pub /home/aether/.ssh/authorized_keys
|
|
|
|
chmod 0600 /home/aether/.ssh/authorized_keys
|
|
|
|
chown aether /home/aether/.ssh/authorized_keys
|
|
|
|
mkdir /usr/local/etc/Aether
|
|
|
|
chown aether /usr/local/etc/Aether
|
|
|
|
chmod 0700 /usr/local/etc/Aether
|
|
|
|
touch /usr/local/etc/Aether/nodeslist
|
|
|
|
@echo You have the files. Add aether-gen.bash and server-backup to root's crontab.
|
|
|
|
@echo Track client nodes in /usr/local/etc/Aether/nodeslist
|
|
|
|
|
|
|
|
user: aether make-user.bash
|
|
|
|
/bin/bash ./make-user.bash
|
|
|
|
|
|
|
|
tar: aether.bash aether make-user.bash
|
|
|
|
tar cvf aether.tar aether.bash aether Makefile make-user.bash
|
|
|
|
gzip aether.tar
|
|
|
|
|
|
|
|
node-command:
|
|
|
|
@echo -ne 'bzr checkout bzr://aninix.net/Aether'
|
|
|
|
@echo
|
|
|
|
@echo -ne 'cd Aether; cat > aether # Paste the private key'
|
|
|
|
@echo
|
|
|
|
@echo -ne 'make client'
|
|
|
|
@echo
|
|
|
|
|
|
|
|
keys:
|
|
|
|
ssh-keygen -t rsa -P "" -f aether
|
2016-09-21 21:43:35 -05:00
|
|
|
|
|
|
|
scripts: ./server-backup ./remote-backup
|
|
|
|
cp ./server-backup /root/bin
|
|
|
|
chmod 0700 /root/bin/server-backup
|
|
|
|
cp ./remote-backup /root/bin
|
|
|
|
chmod 0700 /root/bin/remote-backup
|
|
|
|
|
|
|
|
reverse:
|
|
|
|
cp /root/bin/server-backup .
|
|
|
|
cp /root/bin/remote-backup .
|
2016-11-09 22:29:17 -06:00
|
|
|
|
|
|
|
checkperm:
|
|
|
|
chmod 0700 /root/bin/remote-backup /root/bin/remote-backup
|
|
|
|
chown root:root /root/bin/server-backup /root/bin/remote-backup
|
|
|
|
chmod -R 0700 /usr/local/etc/Aether
|
|
|
|
chown -R aether:aether /usr/local/etc/Aether
|
|
|
|
chown postgres:root ${BACKUPDIR}
|
|
|
|
chmod 0770 ${BACKUPDIR}
|
|
|
|
|
|
|
|
|