Commit de74214934e94705e4f716631538194012522f5b
1 parent
3eb555e603
Exists in
master
Do not update /etc/hosts for nothing
Showing 1 changed file with 3 additions and 8 deletions Side-by-side Diff
scripts/install
| ... | ... | @@ -79,14 +79,12 @@ sudo yunohost app setting owncloud unprotected_uris -v "/" |
| 79 | 79 | sudo yunohost app ssowatconf |
| 80 | 80 | |
| 81 | 81 | # Owncloud installation via curl |
| 82 | -echo "127.0.0.1 $domain #yunoowncloud" | sudo tee -a /etc/hosts | |
| 83 | -sleep 1 | |
| 84 | -curl -kL -X POST https://$domain$path/index.php --data "install=true&adminlogin=admin&adminpass=$db_pwd&directory=/home/yunohost.app/owncloud/data&dbtype=mysql&dbuser=$db_user&dbpass=$db_pwd&dbname=$db_user&dbhost=localhost" > /dev/null 2>&1 | |
| 82 | +curl -kL -H "Host: $domain" -X POST https://$domain$path/index.php --data "install=true&adminlogin=admin&adminpass=$db_pwd&directory=/home/yunohost.app/owncloud/data&dbtype=mysql&dbuser=$db_user&dbpass=$db_pwd&dbname=$db_user&dbhost=localhost" > /dev/null 2>&1 | |
| 85 | 83 | |
| 86 | 84 | # Enable plugins |
| 87 | 85 | sleep 5 |
| 88 | -curl -kL -X POST https://$domain$path/index.php/settings/ajax/enableapp.php --data "appid=files_external" -u "admin:$db_pwd" > /dev/null 2>&1 | |
| 89 | -curl -kL -X POST https://$domain$path/index.php/settings/ajax/enableapp.php --data "appid=user_ldap" -u "admin:$db_pwd" > /dev/null 2>&1 | |
| 86 | +curl -kL -H "Host: $domain" -X POST https://$domain$path/index.php/settings/ajax/enableapp.php --data "appid=files_external" -u "admin:$db_pwd" > /dev/null 2>&1 | |
| 87 | +curl -kL -H "Host: $domain" -X POST https://$domain$path/index.php/settings/ajax/enableapp.php --data "appid=user_ldap" -u "admin:$db_pwd" > /dev/null 2>&1 | |
| 90 | 88 | |
| 91 | 89 | # Check if the Mysql database is initialized & running |
| 92 | 90 | mysql -u $db_user -p$db_pwd $db_user -e "select * from oc_appconfig;" > /dev/null 2>&1 |
| ... | ... | @@ -119,6 +117,3 @@ sudo chmod -R 770 $data_path |
| 119 | 117 | mysql -u $db_user -p$db_pwd $db_user -e "INSERT INTO oc_group_user VALUES ('admin','$user');" |
| 120 | 118 | |
| 121 | 119 | sudo yunohost app ssowatconf |
| 122 | - | |
| 123 | -# Remove temporary entry in /etc/hosts | |
| 124 | -sudo sed -i '/yunoowncloud/d' /etc/hosts |