Added: create target directory

This commit is contained in:
Hannes Riehl 2013-07-10 18:26:27 +02:00
parent 6c293921b2
commit 0ff64aa68a
1 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,13 @@ chmod 0644 "${HOME_DIR}/rsync.conf"
chown root:root "${HOME_DIR}/rsnapshot.conf"
chmod 0644 "${HOME_DIR}/rsnapshot.conf"
# Create backup directory
mkdir -p "${HOME_DIR}/${FILES_DIR}/.sync"
# Set permissions for backup directory
chown -R "${USERNAME}":"${GROUPNAME}" "${HOME_DIR}/${FILES_DIR}/.sync"
chmod -R 0755 "${HOME_DIR}/${FILES_DIR}/.sync"
# If SSH key file has been specified
if [ "${ssh_key_file}" != "" ]; then
rs-add-ssh-key "${remote_hostname}" "${remote_username}" "${ssh_key_file}"