mirror of
https://github.com/YunoHost-Apps/borgserver_ynh.git
synced 2024-09-03 20:36:20 +02:00
Fix: mkdir home
This commit is contained in:
parent
840b7f4758
commit
677a9cca66
3 changed files with 9 additions and 0 deletions
|
@ -33,6 +33,9 @@ install_borg_with_pip
|
||||||
ynh_script_progression --message="Configuring user and SSH public key for remote connexion..."
|
ynh_script_progression --message="Configuring user and SSH public key for remote connexion..."
|
||||||
|
|
||||||
ynh_system_user_create --username="$ssh_user" --home_dir="/home/$ssh_user" --use_shell --groups ssh.app
|
ynh_system_user_create --username="$ssh_user" --home_dir="/home/$ssh_user" --use_shell --groups ssh.app
|
||||||
|
mkdir -p "/home/$ssh_user"
|
||||||
|
chmod 700 "/home/$ssh_user"
|
||||||
|
chown "$ssh_user" "/home/$ssh_user"
|
||||||
|
|
||||||
# Tweak to prevent the backup of the backup itself
|
# Tweak to prevent the backup of the backup itself
|
||||||
touch "/home/$ssh_user/.nobackup"
|
touch "/home/$ssh_user/.nobackup"
|
||||||
|
|
|
@ -22,6 +22,9 @@ ynh_restore_file --origin_path="$install_dir"
|
||||||
ynh_script_progression --message="Restoring the user and SSH configuration..." --weight=1
|
ynh_script_progression --message="Restoring the user and SSH configuration..." --weight=1
|
||||||
|
|
||||||
ynh_system_user_create --username="$ssh_user" --home_dir="/home/$ssh_user" --use_shell --groups ssh.app
|
ynh_system_user_create --username="$ssh_user" --home_dir="/home/$ssh_user" --use_shell --groups ssh.app
|
||||||
|
mkdir -p "/home/$ssh_user"
|
||||||
|
chmod 700 "/home/$ssh_user"
|
||||||
|
chown "$ssh_user" "/home/$ssh_user"
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/home/$ssh_user/.ssh"
|
ynh_restore_file --origin_path="/home/$ssh_user/.ssh"
|
||||||
ynh_restore_file --origin_path="/home/$ssh_user/.nobackup"
|
ynh_restore_file --origin_path="/home/$ssh_user/.nobackup"
|
||||||
|
|
|
@ -61,6 +61,9 @@ install_borg_with_pip
|
||||||
ynh_script_progression --message="Making sure SSH user exists with appropriate permissions..."
|
ynh_script_progression --message="Making sure SSH user exists with appropriate permissions..."
|
||||||
|
|
||||||
ynh_system_user_create --username="$ssh_user" --home_dir="/home/$ssh_user" --use_shell --groups ssh.app
|
ynh_system_user_create --username="$ssh_user" --home_dir="/home/$ssh_user" --use_shell --groups ssh.app
|
||||||
|
mkdir -p "/home/$ssh_user"
|
||||||
|
chmod 700 "/home/$ssh_user"
|
||||||
|
chown "$ssh_user" "/home/$ssh_user"
|
||||||
|
|
||||||
# Tweak to prevent the backup of the backup itself
|
# Tweak to prevent the backup of the backup itself
|
||||||
touch "/home/$ssh_user/.nobackup"
|
touch "/home/$ssh_user/.nobackup"
|
||||||
|
|
Loading…
Reference in a new issue