improvements

This commit is contained in:
Gero Müller 2017-06-12 11:16:31 +10:00
parent 623fc9d8f9
commit 9c47bb3c2d
1 changed files with 4 additions and 2 deletions

View File

@ -58,13 +58,15 @@ if [ ! -f /root/.ssh/id_rsa ]; then
ssh-keygen ssh-keygen
fi fi
cat /root/.ssh/id_rsa.pub cat /root/.ssh/id_rsa.pub
read -n 1 -p "Create backup account now" unused
wget -q -O /usr/local/sbin/systembackup https://code.camijo.de/gmueller/server-scripts/raw/master/systembackup wget -q -O /usr/local/sbin/systembackup https://code.camijo.de/gmueller/server-scripts/raw/master/systembackup
chmod +x /usr/local/sbin/systembackup chmod +x /usr/local/sbin/systembackup
if [ ! -f /etc/systembackup.conf ]; then if [ ! -f /etc/systembackup.conf ]; then
PASSWD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32}`
cat >>/etc/systembackup.conf <<EOF cat >>/etc/systembackup.conf <<EOF
REPOSITORY= REPOSITORY=ssh://borg-@backup.camijo.de/~/repo
PASSPHRASE= PASSPHRASE=$PASSWD
MYSQL=no MYSQL=no
EOF EOF
fi fi