Remove owncloud from add/remove users

This commit is contained in:
Bob Mottram 2016-04-10 10:39:22 +01:00
parent d7fd2679c8
commit 61731ecf7a
2 changed files with 0 additions and 29 deletions

View File

@ -277,30 +277,6 @@ if grep -q "install_gnu_social" $COMPLETION_FILE; then
fi
fi
if grep -q "install_owncloud_repo" $COMPLETION_FILE; then
export OC_PASS="$NEW_USER_PASSWORD"
OWNCLOUD_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Owncloud domain" | awk -F ':' '{print $2}')
/var/www/owncloud/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
${PROJECT_NAME}-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
${PROJECT_NAME}-rmsipuser $MY_USERNAME
fi
userdel -r $MY_USERNAME
export OC_PASS=""
exit 11
fi
export OC_PASS=""
fi
if grep -q "install_irc_client" $COMPLETION_FILE; then
IRC_PORT=6697
if grep -q "IRC_PORT" $CONFIGURATION_FILE; then

View File

@ -110,11 +110,6 @@ if [ -f /etc/nginx/.htpasswd ]; then
fi
fi
if grep -q "install_owncloud_repo" $COMPLETION_FILE; then
OWNCLOUD_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Owncloud domain" | awk -F ':' '{print $2}')
/var/www/owncloud/occ user:delete $MY_USERNAME
fi
# remove user from SIP TURN/STUN
if [ -d /etc/turnserver ]; then
sed -i "/${MY_USERNAME}:/d" /etc/turnserver/turnusers.txt