From 797a1b9cefdd72c72ea38703cf87347031acf9ed Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 2 Nov 2015 10:31:49 +0000 Subject: [PATCH] Add SIP user with the adduser command --- src/freedombone-adduser | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/freedombone-adduser b/src/freedombone-adduser index aebfa987..ba46daad 100755 --- a/src/freedombone-adduser +++ b/src/freedombone-adduser @@ -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"