From 8209d4fbac38bbab6cfbe59063e23c19684863d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 30 Jan 2018 11:32:02 +0100 Subject: [PATCH] Fix issue #30 --- conf/first_launch.exp | 6 ++++-- manifest.json | 2 +- scripts/install | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/conf/first_launch.exp b/conf/first_launch.exp index 61b6393..5f71706 100644 --- a/conf/first_launch.exp +++ b/conf/first_launch.exp @@ -11,9 +11,11 @@ expect "for the admin account?" send "$admin_email\r"; expect "for the admin account?" -send "$admin_password\r"; +send {__ADMIN_PASSWORD__}; +send '\r'; expect "Enter the" -send "$admin_password\r"; +send {__ADMIN_PASSWORD__}; +send '\r'; interact diff --git a/manifest.json b/manifest.json index 91d0795..e27c7db 100644 --- a/manifest.json +++ b/manifest.json @@ -19,7 +19,7 @@ "mysql" ], "requirements": { - "yunohost": ">= 2.7.7" + "yunohost": ">= 2.7.9" }, "arguments": { "install": [ diff --git a/scripts/install b/scripts/install index 1899424..e338505 100644 --- a/scripts/install +++ b/scripts/install @@ -137,7 +137,10 @@ chown -R $seafile_user:$seafile_user $seafile_data # Start seafile, seahub and populate admin account su - $seafile_user -s /bin/bash -c "$final_path/seafile-server-$seafile_version/seafile.sh start" -su - $seafile_user -s /bin/bash -c "$final_path/first_launch.exp $final_path/seafile-server-$seafile_version $admin_email $admin_password" +# We escape all char witch needed. +ynh_replace_special_string "__ADMIN_PASSWORD__" $admin_password "$final_path/first_launch.exp" +su - $seafile_user -s /bin/bash -c "$final_path/first_launch.exp $final_path/seafile-server-$seafile_version $admin_email" +ynh_secure_remove "$final_path/first_launch.exp" # Add sso config to unprotect domain.tld/seafhttp + domain.tld/seafdav do in /etc/ssowat/conf.json.persistent cp ../conf/add_sso_conf.py $final_path