Adding owncloud users
This commit is contained in:
parent
236c65d70a
commit
702f28cf15
|
@ -205,7 +205,7 @@ if grep -q "Blog domain" $COMPLETION_FILE; then
|
|||
fi
|
||||
|
||||
if grep -q "install_sip" $COMPLETION_FILE; then
|
||||
SIP_EXTENSION=$(freedombone-sipfreeext)
|
||||
SIP_EXTENSION=$(freedombone-sipfreeext)
|
||||
freedombone-addsipuser -u $MY_USERNAME -e $SIP_EXTENSION -p "$NEW_USER_PASSWORD"
|
||||
if [ ! "$?" = "0" ]; then
|
||||
echo 'SIP user could not be added. Ensure that extension numbers are in order and do no exceed 299'
|
||||
|
@ -214,10 +214,22 @@ 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
|
||||
echo "Their SIP phone extension is $SIP_EXTENSION"
|
||||
echo "Their SIP phone extension is $SIP_EXTENSION"
|
||||
fi
|
||||
echo "Their login password is $NEW_USER_PASSWORD"
|
||||
echo ''
|
||||
|
|
Loading…
Reference in New Issue