From c85817edf54b2c50b3a8da8969742f99db3afa12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sat, 25 Jul 2015 11:10:11 +0200 Subject: [PATCH] [fix]binary comparison not working on strings o_o' --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 98f4f60..d9f202b 100755 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,7 @@ admin_user=$3 # Check user parameter if not empty -if [[ $admin_user -ne '' ]]; then +if [[ $admin_user != '' ]]; then sudo yunohost user list --json | grep -qi "\"username\": \"$admin_user\"" if [[ ! $? -eq 0 ]]; then echo "Wrong user" @@ -45,7 +45,7 @@ sudo sed -i "s/yunopass/$db_pwd/g" $final_path/data/config.php sudo sed -i "s/yunobase/$db_user/g" $final_path/data/config.php sudo sed -i "s/yunosalt/$app_salt/g" $final_path/data/config.php sudo sed -i "s@yunopath@$path@g" $final_path/data/config.php -if [[ $admin_user -ne '' ]]; then +if [[ $admin_user != '' ]]; then sudo sed -i "s/yunoadminuser/$admin_user/g" $final_path/data/config.php else sudo sed -i '/yunoadminuser/d' $final_path/data/config.php