mirror of
https://github.com/YunoHost-Apps/pluxml_ynh.git
synced 2024-09-03 20:16:02 +02:00
[enh] urlencode when sending param via curl, and clearer command line
This commit is contained in:
parent
69646e9adb
commit
a7b70b00bb
1 changed files with 9 additions and 1 deletions
|
@ -58,7 +58,15 @@ sudo curl -kL -o install_page.html https://$domain/$path/install.php >/dev/null
|
|||
#get the token for form validation
|
||||
token=$(sudo cat install_page.html | grep "input" | grep "token" | tail -1 | cut -d' ' -f3 | cut -d'"' -f2)
|
||||
#send http POST values
|
||||
sudo curl -k -X POST --data "default_lang=$default_lang&install=Installer&name=$admin&login=$admin&pwd=$password&pwd2=$password&token=$token" https://$domain/$path/install.php >/dev/null 2>&1
|
||||
sudo curl -k -X POST \
|
||||
--data-urlencode "default_lang=$default_lang" \
|
||||
--data-urlencode "install=Installer" \
|
||||
--data-urlencode "name=$admin" \
|
||||
--data-urlencode "login=$admin" \
|
||||
--data-urlencode "pwd=$password" \
|
||||
--data-urlencode "pwd2=$password" \
|
||||
--data-urlencode "token=$token" \
|
||||
https://$domain/$path/install.php > /dev/null 2>&1
|
||||
|
||||
# If app is private, remove url to SSOWat conf from skipped_uris
|
||||
if [ "$is_public" = "No" ];
|
||||
|
|
Loading…
Add table
Reference in a new issue