Commit be1d85a810e7a741e474077b544911b33dff07bf

Authored by Alexis Gavoty
1 parent a28e915cad
Exists in master

Update install

Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff

... ... @@ -22,7 +22,7 @@ fi
22 22 sudo apt-get install acl smbclient -y -qq
23 23  
24 24 # Generate random password
25   -db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*//p')
  25 +db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*//p')
26 26  
27 27 # Use 'owncloud' as database name and user
28 28 db_user=owncloud
... ... @@ -78,7 +78,6 @@ curl -kL -X POST https://$domain$path/index.php --data "install=true&adminlogin=
78 78 sleep 5
79 79 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
80 80 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
81   -curl -kL -X POST https://$domain$path/index.php/settings/ajax/togglegroups.php --data "username=$user&group=admin" -u "admin:$db_pwd" > /dev/null 2>&1
82 81  
83 82 # Check if the Mysql database is initialized & running
84 83 mysql -u $db_user -p$db_pwd $db_user -e "select * from oc_appconfig;" > /dev/null 2>&1
... ... @@ -100,6 +99,9 @@ done
100 99 # Configure LDAP plugin
101 100 mysql -u $db_user -p$db_pwd $db_user < ../conf/ldap_config.sql
102 101  
  102 +# Make an LDAP user as admin
  103 +mysql -u $db_user -p$db_pwd $db_user -e "INSERT INTO `oc_group_user` VALUES ('admin','jerome');"
  104 +
103 105 # Unprotect URIs
104 106 sudo yunohost app setting owncloud skipped_uris -v "/public.php,/core,/apps/files,/index.php/apps/files"
105 107 sudo yunohost app setting owncloud unprotected_uris -v "/remote.php,/cron.php,/status.php"