1
0
Fork 0
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:
Maniack Crudelis 2017-10-31 23:58:54 +01:00
parent bced78c504
commit 2c8a63bd65

View file

@ -112,23 +112,25 @@ quotas_activate "$quotas_mount_point"
add_password="" add_password=""
if [ -n "$password" ] if [ -n "$password" ]
then then
add_password="--password \"$password\"" auth_opt="--password"
auth_value="$password"
fi fi
add_sshkey="" add_sshkey=""
if [ -n "$pub_key" ] if [ -n "$pub_key" ]
then then
ynh_app_setting_set $app pub_key $pub_key ynh_app_setting_set $app pub_key $pub_key
add_sshkey="--sshkey \"$pub_key\"" auth_opt="--sshkey"
auth_value="$pub_key"
fi 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 # 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 # GENERIC FINALIZATION