mirror of
https://github.com/YunoHost-Apps/ssh_chroot_dir_ynh.git
synced 2024-09-03 20:26:26 +02:00
Fix double quote issue and ln conflict
This commit is contained in:
parent
bced78c504
commit
2c8a63bd65
1 changed files with 6 additions and 4 deletions
|
@ -112,23 +112,25 @@ quotas_activate "$quotas_mount_point"
|
|||
add_password=""
|
||||
if [ -n "$password" ]
|
||||
then
|
||||
add_password="--password \"$password\""
|
||||
auth_opt="--password"
|
||||
auth_value="$password"
|
||||
fi
|
||||
|
||||
add_sshkey=""
|
||||
if [ -n "$pub_key" ]
|
||||
then
|
||||
ynh_app_setting_set $app pub_key $pub_key
|
||||
add_sshkey="--sshkey \"$pub_key\""
|
||||
auth_opt="--sshkey"
|
||||
auth_value="$pub_key"
|
||||
fi
|
||||
|
||||
$final_path/chroot_manager.sh adduser --name $ssh_user $add_password $add_sshkey --directory "$user_dir" --quota $size
|
||||
$final_path/chroot_manager.sh adduser --name $ssh_user $auth_opt "$auth_value" --directory "$user_dir" --quota $size
|
||||
|
||||
#=================================================
|
||||
# ADD A LINK TO CHROOT_MANAGER
|
||||
#=================================================
|
||||
|
||||
ln -s $final_path/chroot_manager.sh /home/yunohost.app/ssh_chroot_directories/chroot_manager
|
||||
ln -sf $final_path/chroot_manager.sh /home/yunohost.app/ssh_chroot_directories/chroot_manager
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue