diff --git a/conf/setup.exp b/conf/setup.exp index 0712101..9cec340 100644 --- a/conf/setup.exp +++ b/conf/setup.exp @@ -4,7 +4,6 @@ set timeout 20 set cmd [lindex $argv 0] set path [lindex $argv 1] set user [lindex $argv 2] -set password [lindex $argv 3] spawn $cmd $path @@ -12,9 +11,11 @@ expect "Email address:" send "$user\r"; expect "Password:" -send "$password\r"; +send {__ADMIN_PASSWORD__}; +send "\r"; expect "Retype password:" -send "$password\r"; +send {__ADMIN_PASSWORD__}; +send "\r"; interact diff --git a/manifest.json b/manifest.json index a0042f3..341f88a 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "josue@tille.ch" }, "requirements": { - "yunohost": ">= 2.7.2" + "yunohost": ">= 2.7.9" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index 40356fb..43cf863 100644 --- a/scripts/install +++ b/scripts/install @@ -66,7 +66,8 @@ ynh_add_nginx_config chmod +x ../conf/setup.exp PS1="" source $final_path/bin/activate -../conf/setup.exp "$final_path/bin/python2.7" "$final_path/lib/python2.7/site-packages/pgadmin4/setup.py" "$admin@$domain" "$admin_pwd" +ynh_replace_special_string "__ADMIN_PASSWORD__" "$admin_pwd" "../conf/setup.exp" +../conf/setup.exp "$final_path/bin/python2.7" "$final_path/lib/python2.7/site-packages/pgadmin4/setup.py" "$admin@$domain" # POPULATE THE DATABASE ynh_psql_test_if_first_run @@ -86,5 +87,4 @@ yunohost app addaccess --users=$admin $app ynh_use_logrotate /var/log/pgadmin # RELOAD NGINX -systemctl reload nginx systemctl restart uwsgi diff --git a/scripts/upgrade b/scripts/upgrade index f94bcd6..ec24630 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,5 +37,4 @@ set_permission ynh_add_nginx_config # RELOAD NGINX -systemctl reload nginx systemctl reload uwsgi