Browse Source

Checks when adding users

Bob Mottram 7 years ago
parent
commit
5bd77daaf8

+ 6
- 0
src/freedombone-app-gogs View File

@@ -384,6 +384,12 @@ function install_gogs {
384 384
     fi
385 385
 
386 386
     adduser --disabled-login --gecos 'Gogs' $GOGS_USERNAME
387
+
388
+    if [ ! -d /home/$GOGS_USERNAME ]; then
389
+        echo $"/home/$GOGS_USERNAME directory not created"
390
+        exit 783528
391
+    fi
392
+
387 393
     groupadd gogs
388 394
 
389 395
     gogs_parameters

+ 4
- 0
src/freedombone-app-ipfs View File

@@ -450,6 +450,10 @@ function install_ipfs_go {
450 450
     if [ ! -d /home/git ]; then
451 451
         # add a gogs user account
452 452
         adduser --disabled-login --gecos 'Gogs' git
453
+        if [ ! -d /home/git ]; then
454
+            echo $"/home/git directory not created"
455
+            exit 735272
456
+        fi
453 457
 
454 458
         # install Go
455 459
         if ! grep -q "export GOPATH=" ~/.bashrc; then

+ 4
- 0
src/freedombone-app-irc View File

@@ -616,6 +616,10 @@ function install_irc_bouncer {
616 616
     apt-get -yq install znc
617 617
 
618 618
     adduser --disabled-login --gecos 'znc' znc
619
+    if [ ! -d /home/znc ]; then
620
+        echo $"/home/znc directory not created"
621
+        exit 7354262
622
+    fi
619 623
 
620 624
     mkdir -p /home/znc/.znc/configs
621 625
     mkdir -p /home/znc/.znc/users

+ 5
- 0
src/freedombone-app-pihole View File

@@ -351,6 +351,11 @@ function remove_pihole {
351 351
 function install_pihole {
352 352
     apt-get -yq install dnsmasq curl
353 353
     adduser --disabled-login --gecos 'pi-hole' pihole
354
+    if [ ! -d /home/pihole ]; then
355
+        echo $"/home/pihole directory not created"
356
+        exit 538929
357
+    fi
358
+
354 359
     chmod 600 /etc/shadow
355 360
     chmod 600 /etc/gshadow
356 361
     usermod -a -G www-data pihole

+ 5
- 0
src/freedombone-app-turtl View File

@@ -563,6 +563,11 @@ __ENDCONFIG__
563 563
     fi
564 564
 
565 565
     adduser --disabled-login --home=$TURTL_BASE_DIR --gecos 'turtl' turtl
566
+    if [ ! -d /home/turtl ]; then
567
+        echo $"/home/turtl directory not created"
568
+        exit 263493
569
+    fi
570
+
566 571
     groupadd turtl
567 572
     chown -R turtl:turtl $TURTL_BASE_DIR
568 573