mirror of
https://github.com/YunoHost-Apps/borgserver_ynh.git
synced 2024-09-03 20:36:20 +02:00
Merge pull request #72 from YunoHost-Apps/fix-authorized_keys-file
Fix authorized keys file
This commit is contained in:
commit
5db0a7ae07
1 changed files with 2 additions and 2 deletions
|
@ -29,12 +29,12 @@ create_ssh_config() {
|
||||||
if [[ -n "$quota" ]]; then
|
if [[ -n "$quota" ]]; then
|
||||||
extra="--storage-quota $quota"
|
extra="--storage-quota $quota"
|
||||||
fi
|
fi
|
||||||
command="$install_dir/venv/bin/borg serve $extra --restrict-to-repository $repository"
|
command="PATH=$install_dir/venv/bin/:$PATH borg serve $extra --restrict-to-repository $repository"
|
||||||
ssh_opts="command=\"$command\",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc"
|
ssh_opts="command=\"$command\",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc"
|
||||||
|
|
||||||
mkdir -p "$ssh_dir"
|
mkdir -p "$ssh_dir"
|
||||||
touch "$ssh_dir/authorized_keys"
|
touch "$ssh_dir/authorized_keys"
|
||||||
echo "$ssh_opts $public_key" >> "$ssh_dir/authorized_keys"
|
echo "$ssh_opts $public_key" > "$ssh_dir/authorized_keys"
|
||||||
|
|
||||||
chown -R "$ssh_user:$ssh_user" "$ssh_dir"
|
chown -R "$ssh_user:$ssh_user" "$ssh_dir"
|
||||||
chmod -R u=rwX,go=--- "$ssh_dir"
|
chmod -R u=rwX,go=--- "$ssh_dir"
|
||||||
|
|
Loading…
Add table
Reference in a new issue