1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borgserver_ynh.git synced 2024-09-03 20:36:20 +02:00

[fix] Missing authorized_keys

This commit is contained in:
ljf (zamentur) 2022-10-27 04:21:32 +02:00 committed by GitHub
parent 04eeaed423
commit d4503dc624
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ ssh_user=$(ynh_app_setting_get --app=$app --key=ssh_user)
public_key=$(ynh_app_setting_get --app=$app --key=public_key) public_key=$(ynh_app_setting_get --app=$app --key=public_key)
alert_delay=$(ynh_app_setting_get --app=$app --key=alert_delay) alert_delay=$(ynh_app_setting_get --app=$app --key=alert_delay)
alert_mails=$(ynh_app_setting_get --app=$app --key=alert_mails) alert_mails=$(ynh_app_setting_get --app=$app --key=alert_mails)
quota=$(ynh_app_setting_get --app=$app --key=quota)
#================================================= #=================================================
# CHECK IF AN UPGRADE IS NEEDED # CHECK IF AN UPGRADE IS NEEDED
@ -107,6 +108,11 @@ ynh_script_progression --message="Seting good permissions..."
mkdir -p /home/$ssh_user/.ssh mkdir -p /home/$ssh_user/.ssh
chmod o=--- /home/$ssh_user chmod o=--- /home/$ssh_user
extra="--storage-quota $quota"
if [ "$quota" = "" ]; then
extra=""
fi
echo "command=\"borg serve $extra --restrict-to-repository /home/$ssh_user/backup\",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc $public_key" >> /home/$ssh_user/.ssh/authorized_keys
chown -R $ssh_user:$ssh_user /home/$ssh_user chown -R $ssh_user:$ssh_user /home/$ssh_user
#================================================= #=================================================