From be1d85a810e7a741e474077b544911b33dff07bf Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Mon, 9 Dec 2013 16:47:47 +0100 Subject: [PATCH] Update install --- scripts/install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 3528d22..a624c3b 100755 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,7 @@ fi sudo apt-get install acl smbclient -y -qq # Generate random password -db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') +db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p') # Use 'owncloud' as database name and user db_user=owncloud @@ -78,7 +78,6 @@ curl -kL -X POST https://$domain$path/index.php --data "install=true&adminlogin= sleep 5 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 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 -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 # Check if the Mysql database is initialized & running mysql -u $db_user -p$db_pwd $db_user -e "select * from oc_appconfig;" > /dev/null 2>&1 @@ -100,6 +99,9 @@ done # Configure LDAP plugin mysql -u $db_user -p$db_pwd $db_user < ../conf/ldap_config.sql +# Make an LDAP user as admin +mysql -u $db_user -p$db_pwd $db_user -e "INSERT INTO `oc_group_user` VALUES ('admin','jerome');" + # Unprotect URIs sudo yunohost app setting owncloud skipped_uris -v "/public.php,/core,/apps/files,/index.php/apps/files" sudo yunohost app setting owncloud unprotected_uris -v "/remote.php,/cron.php,/status.php" -- 2.0.0