Add SIP user with the adduser command

This commit is contained in:
Bob Mottram 2015-11-02 10:31:49 +00:00
parent 5f7447665a
commit 797a1b9cef
1 changed files with 9 additions and 0 deletions

View File

@ -201,6 +201,15 @@ if grep -q "Blog domain" $COMPLETION_FILE; then
echo "$MY_USERNAME added as a blog user"
fi
if grep -q "install_sip" $COMPLETION_FILE; then
freedombone-addsipuser -u $MY_USERNAME -e $SIP_EXTENSION -p "$NEW_USER_PASSWORD"
if [ ! "$?" = "0" ]; then
echo 'SIP user could not be added'
userdel -r $MY_USERNAME
exit 10
fi
fi
clear
echo "New user $MY_USERNAME was created"
echo "Their login password is $NEW_USER_PASSWORD"