From 2c8a63bd655cb68f6cff13cc9f66550bb4290558 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 31 Oct 2017 23:58:54 +0100 Subject: [PATCH] Fix double quote issue and ln conflict --- scripts/install | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index f2d106d..91817a8 100755 --- a/scripts/install +++ b/scripts/install @@ -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