1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pluxml_ynh.git synced 2024-09-03 20:16:02 +02:00

[fix] adding domain into /etc/hosts for install on subdomains

This commit is contained in:
matlink 2014-11-23 17:30:50 +01:00 committed by Moul
parent 32e69ea6eb
commit d7e4fd20bf

View file

@ -55,9 +55,14 @@ sudo yunohost app setting $app unprotected_uris -v "/"
sudo service nginx reload
sudo yunohost app ssowatconf
#temporary add domain name to /etc/hosts
sudo sed -i "1 i\127.0.0.1 $domain #pluxml_hosts" /etc/hosts
#make request to install app
#get the html page
curl -kL -o install_page.html https://$domain$path/install.php >/dev/null 2>&1
#get the token for form validation
token=$(cat install_page.html | grep "input" | grep "token" | tail -1 | cut -d' ' -f3 | cut -d'"' -f2)
#send http POST values
@ -73,6 +78,9 @@ curl -k -X POST \
sudo rm -f $final_path/install.php
#remove domain name from /etc/hosts
sudo sed -i "/#pluxml_hosts/d" /etc/hosts
# If app is private, remove url to SSOWat conf from skipped_uris
if [ "$is_public" = "No" ];
then