Update paths within script files

This commit is contained in:
Janek Bevendorff 2014-09-12 18:47:10 +02:00
parent 90c98ad83f
commit 76bf848c4f
12 changed files with 17 additions and 18 deletions

6
.gitignore vendored
View File

@ -6,6 +6,6 @@ desktop.ini
Desktop.ini
.DS_Store
server/usr/local/etc/rs-backup/server-config
client/usr/local/etc/rs-backup/client-config
client/usr/local/etc/rs-backup/include-files
server/etc/rs-backup/server-config
client/etc/rs-backup/client-config
client/etc/rs-backup/include-files

View File

@ -23,7 +23,7 @@ server-install: $(wildcard server/bkp/etc/*) $(wildcard server/etc/*/*) $(wildca
mkdir -p /etc/rs-skel
mkdir -p /etc/rs-backup
mkdir -p /bkp/{bin,dev,etc,lib,usr}
mkdir -p /bkp/usr/{bin,lib,local,share}
mkdir -p /bkp/usr/{bin,lib,share}
ifeq ($(OS),Ubuntu)
mkdir -p /bkp/usr/share/perl

View File

@ -52,7 +52,6 @@ rs-backup-suite can chroot backup users into the backup home base directory. For
/lib /bkp/lib none bind 0 0
/usr/bin /bkp/usr/bin none bind 0 0
/usr/lib /bkp/usr/lib none bind 0 0
/usr/local/bin /bkp/usr/local/bin none bind 0 0
/usr/share/perl5 /bkp/usr/share/perl5 none bind 0 0
/dev /bkp/dev none bind 0 0

View File

@ -14,7 +14,7 @@
# Source configs
###############################################################################
. /usr/local/etc/rs-backup/client-config
. /etc/rs-backup/client-config
###############################################################################
@ -22,7 +22,7 @@
###############################################################################
_VERSION=0.1.1
_GLOBAL_INCLUSION_PATTERN_FILE="/usr/local/etc/rs-backup/include-files"
_GLOBAL_INCLUSION_PATTERN_FILE="/etc/rs-backup/include-files"
_FORCED_INCLUSION_PATTERN_FILE=""
_SKIP_HOME_DIRS=false
_FORCED_LOG_FILE=""

View File

@ -1,2 +1,2 @@
#!/bin/sh
/usr/local/sbin/rs-rotate-cron daily
/usr/sbin/rs-rotate-cron daily

View File

@ -1,2 +1,2 @@
#!/bin/sh
/usr/local/sbin/rs-rotate-cron monthly
/usr/sbin/rs-rotate-cron monthly

View File

@ -1,2 +1,2 @@
#!/bin/sh
/usr/local/sbin/rs-rotate-cron weekly
/usr/sbin/rs-rotate-cron weekly

View File

@ -8,7 +8,7 @@ log file = ${HOME_DIR}/rsync.log
fake super = 1
max connections = 1
lock file = ${HOME_DIR}/rsyncd.lock
post-xfer exec = touch "${HOME_DIR}/${FILES_DIR}/.sync" && /usr/local/bin/rs-rotate "${HOME_DIR}/rsnapshot.conf"
post-xfer exec = touch "${HOME_DIR}/${FILES_DIR}/.sync" && /usr/bin/rs-rotate "${HOME_DIR}/rsnapshot.conf"
[pull]
uid = ${USERNAME}

View File

@ -12,14 +12,14 @@ if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
exit
fi
. /usr/local/etc/rs-backup/server-config
. /etc/rs-backup/server-config
home_dir="${BACKUP_ROOT}/${1}-${2}"
mkdir -p "${home_dir}/.ssh"
# Add public key to authorized_keys file and restrict shell commands
echo -n "command=\"/usr/local/bin/rs-run-ssh-cmd '${home_dir}'\" " >> "${home_dir}/.ssh/authorized_keys"
echo -n "command=\"/usr/bin/rs-run-ssh-cmd '${home_dir}'\" " >> "${home_dir}/.ssh/authorized_keys"
cat "$3" >> "${home_dir}/.ssh/authorized_keys"
# Protect SSH config by assigning ownership to root

View File

@ -12,7 +12,7 @@ if [ "$1" == "" ] || [ "$2" == "" ]; then
exit
fi
. /usr/local/etc/rs-backup/server-config
. /etc/rs-backup/server-config
remote_hostname="$1"
remote_username="$2"
@ -27,8 +27,8 @@ USERNAME="${local_username}"
GROUPNAME="${local_username}"
HOME_DIR="${BACKUP_ROOT}/${local_username}"
rsync_conf="$(cat /usr/local/etc/rs-backup/rsync.conf.template)"
rsnapshot_conf="$(cat /usr/local/etc/rs-backup/rsnapshot.conf.template)"
rsync_conf="$(cat /etc/rs-backup/rsync.conf.template)"
rsnapshot_conf="$(cat /etc/rs-backup/rsnapshot.conf.template)"
rsync_conf=$(eval "cat << EOF
${rsync_conf}

View File

@ -6,7 +6,7 @@ if [ "$1" == "" ]; then
exit
fi
. /usr/local/etc/rs-backup/server-config
. /etc/rs-backup/server-config
for home_dir in "${BACKUP_ROOT}"/*; do
if [ -d "${home_dir}/${FILES_DIR}" ] && [ -e "${home_dir}/rsnapshot.conf" ]; then

View File

@ -1,6 +1,6 @@
#!/bin/bash
. /usr/local/etc/rs-backup/server-config
. /etc/rs-backup/server-config
# Take precautions :-)
if [ "${BACKUP_ROOT}" == "" ] || [ "$(realpath ${BACKUP_ROOT})" == "/" ]; then