Adding owncloud users

This commit is contained in:
Bob Mottram 2015-11-10 12:29:43 +00:00
parent 236c65d70a
commit 702f28cf15
1 changed files with 14 additions and 2 deletions

View File

@ -214,6 +214,18 @@ if grep -q "install_sip" $COMPLETION_FILE; then
fi
fi
if grep -q "install_owncloud" $COMPLETION_FILE; then
export OC_PASS="$NEW_USER_PASSWORD"
occ user:add --password-from-env --display-name="$MY_USERNAME" --group="users" $MY_USERNAME
if [ ! "$?" = "0" ]; then
echo 'Owncloud user could not be added'
freedombone-rmsipuser $MY_USERNAME
userdel -r $MY_USERNAME
exit 11
fi
export OC_PASS=""
fi
clear
echo "New user $MY_USERNAME was created"
if [ $SIP_EXTENSION ]; then