0108fcf653
This patch modularize run.sh, adding two new helper scripts and make it possible to specify a git repository for ssh keys via a new env variable `BORG_SSHKEYS_REPO`. the modularization add two new files : - `env.sh` : define a few envriroment variables - `create-client-dirs.sh` : update and create user directories and re-create authorized_keys We also add a new script `update-ssh-keys.sh` to be called regurlarly in a cron job to check if the git repository is up-to-date and eventually adding/removing users.
10 lines
367 B
Bash
Executable file
10 lines
367 B
Bash
Executable file
BORG_DATA_DIR=/backup
|
|
SSH_KEY_DIR=/sshkeys
|
|
BORG_CMD='cd ${BORG_DATA_DIR}/${client_name}; borg serve --restrict-to-path ${BORG_DATA_DIR}/${client_name} ${BORG_SERVE_ARGS}'
|
|
AUTHORIZED_KEYS_PATH=/home/borg/.ssh/authorized_keys
|
|
|
|
# Append only mode?
|
|
BORG_APPEND_ONLY=${BORG_APPEND_ONLY:=no}
|
|
|
|
export BORG_DATA_DIR SSH_KEY_DIR BORG_CMD AUTHORIZED_KEYS_PATH BORG_APPEND_ONLY
|