New remote backup script

This commit is contained in:
DarkFeather
2016-09-21 21:43:35 -05:00
parent 751925085e
commit d7d5eb346c
3 changed files with 37 additions and 2 deletions

View File

@@ -1,6 +1,10 @@
SHELL := /bin/bash
null:
compile:
pacman -S openssl gzip tar openssh
make keys
install:
@echo You must specify client or server in a call to make.
client: user aether.bash
@@ -15,7 +19,7 @@ client: user aether.bash
touch /var/log/aether.log
chown aether:aether /var/log/aether.log
server: user aether-gen.bash aether.pub server-backup
server: scripts user ./aether-gen.bash ./aether.pub ./server-backup
bash ./aether-gen.bash
cp ./aether.pub /home/aether/.ssh/authorized_keys
chmod 0600 /home/aether/.ssh/authorized_keys
@@ -44,3 +48,13 @@ node-command:
keys:
ssh-keygen -t rsa -P "" -f aether
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 .