Fixes
This commit is contained in:
parent
d7d5eb346c
commit
00f5dcc8f3
11
Makefile
11
Makefile
@ -1,4 +1,5 @@
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
BACKUPDIR := /usr/local/backup
|
||||||
|
|
||||||
compile:
|
compile:
|
||||||
pacman -S openssl gzip tar openssh
|
pacman -S openssl gzip tar openssh
|
||||||
@ -58,3 +59,13 @@ scripts: ./server-backup ./remote-backup
|
|||||||
reverse:
|
reverse:
|
||||||
cp /root/bin/server-backup .
|
cp /root/bin/server-backup .
|
||||||
cp /root/bin/remote-backup .
|
cp /root/bin/remote-backup .
|
||||||
|
|
||||||
|
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}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
export BACKUPDIR="/usr/local/backup"
|
export BACKUPDIR="/usr/local/backup"
|
||||||
export BACKUPCMD="rsync -avzl --delete-after";
|
export BACKUPCMD="rsync -avzl --delete-after";
|
||||||
|
|
||||||
|
if [ ! -d "$BACKUPDIR" ]; then
|
||||||
|
mkdir "$BACKUPDIR"
|
||||||
|
fi
|
||||||
|
|
||||||
## Backup small development ##
|
## Backup small development ##
|
||||||
chown postgres:root "$BACKUPDIR"
|
chown postgres:root "$BACKUPDIR"
|
||||||
chmod 0770 "$BACKUPDIR"
|
chmod 0770 "$BACKUPDIR"
|
||||||
@ -10,14 +14,13 @@ chmod 0770 "$BACKUPDIR"
|
|||||||
$BACKUPCMD /root/bin/ "$BACKUPDIR"/root/bin/
|
$BACKUPCMD /root/bin/ "$BACKUPDIR"/root/bin/
|
||||||
|
|
||||||
## Backup configuration ##
|
## Backup configuration ##
|
||||||
cp -r /etc/skel "$BACKUPDIR"
|
/usr/local/src/MiscScripts/ShadowArch/shadowarch-tar-gen
|
||||||
cp /etc/bash.bashrc "$BACKUPDIR"/bash.bashrc
|
cp /srv/http/aninix.net/shadowarch.tar "$BACKUPDIR"
|
||||||
cp /etc/vimrc "$BACKUPDIR"/vimrc
|
|
||||||
|
|
||||||
## Backup the good servers ##
|
## Backup the good servers ##
|
||||||
|
|
||||||
### SSHD ###
|
### SSHD ###
|
||||||
$BACKUPCMD /etc/ssh "$BACKUPDIR"/ssh
|
$BACKUPCMD /etc/ssh/ "$BACKUPDIR"/ssh
|
||||||
|
|
||||||
### Lighttpd ###
|
### Lighttpd ###
|
||||||
$BACKUPCMD /etc/lighttpd/ "$BACKUPDIR"/lighttpd
|
$BACKUPCMD /etc/lighttpd/ "$BACKUPDIR"/lighttpd
|
||||||
|
Loading…
Reference in New Issue
Block a user