But alas user:add isn't defined in the current owncloud version

This commit is contained in:
Bob Mottram 2015-11-10 14:17:08 +00:00
parent 32cc928c31
commit a5b7c7e7f4
1 changed files with 22 additions and 22 deletions

View File

@ -226,28 +226,28 @@ 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'
if grep -q "install_xmpp" $COMPLETION_FILE; then
freedombone-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
fi
if grep -q "Blog domain" $COMPLETION_FILE; then
if [ -f /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users/$MY_USERNAME.ini ]; then
rm /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users/$MY_USERNAME.ini
fi
fi
if grep -q "install_sip" $COMPLETION_FILE; then
freedombone-rmsipuser $MY_USERNAME
fi
userdel -r $MY_USERNAME
export OC_PASS=""
exit 11
fi
export OC_PASS=""
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'
# if grep -q "install_xmpp" $COMPLETION_FILE; then
# freedombone-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
# fi
# if grep -q "Blog domain" $COMPLETION_FILE; then
# if [ -f /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users/$MY_USERNAME.ini ]; then
# rm /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users/$MY_USERNAME.ini
# fi
# fi
# if grep -q "install_sip" $COMPLETION_FILE; then
# freedombone-rmsipuser $MY_USERNAME
# fi
# userdel -r $MY_USERNAME
# export OC_PASS=""
# exit 11
# fi
# export OC_PASS=""
#fi
clear
echo "New user $MY_USERNAME was created"