Browse Source

Add GNU Social user

Bob Mottram 9 years ago
parent
commit
6d786a6c80
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      src/freedombone-adduser

+ 13
- 0
src/freedombone-adduser View File

@@ -229,6 +229,19 @@ if grep -q "install_sip" $COMPLETION_FILE; then
229 229
     fi
230 230
 fi
231 231
 
232
+if grep -q "install_gnu_social" $COMPLETION_FILE; then
233
+    MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
234
+    if [ -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then
235
+        cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
236
+        php scripts/registeruser.php -n $MY_USERNAME -w "$NEW_USER_PASSWORD" -e "$MY_USERNAME@$HOSTNAME"
237
+        echo $'Created GNU Social user'
238
+    else
239
+        echo $"Unable to find GNU Social installation at /var/www/$MICROBLOG_DOMAIN_NAME/htdocs"
240
+        userdel -r $MY_USERNAME
241
+        exit 11
242
+    fi
243
+fi
244
+
232 245
 #if grep -q "install_owncloud" $COMPLETION_FILE; then
233 246
 #    export OC_PASS="$NEW_USER_PASSWORD"
234 247
 #    occ user:add --password-from-env --display-name="$MY_USERNAME" --group="users" $MY_USERNAME