Bläddra i källkod

Remove any existing tahoelafs install

Bob Mottram 7 år sedan
förälder
incheckning
d9f3dbff03
1 ändrade filer med 9 tillägg och 6 borttagningar
  1. 9
    6
      src/freedombone-app-tahoelafs

+ 9
- 6
src/freedombone-app-tahoelafs Visa fil

@@ -617,14 +617,17 @@ function install_tahoelafs {
617 617
 
618 618
     apt-get -yq install build-essential python-pip python-dev libffi-dev libssl-dev
619 619
     apt-get -yq install libcrypto++-dev python-pycryptopp python-cffi python-virtualenv
620
-    # create a user
621
-    if [ ! -d $TAHOE_DIR ]; then
622
-        # add a gogs user account
623
-        adduser --disabled-login --gecos 'tahoe-lafs' tahoelafs
624
-        adduser tahoelafs debian-tor
625
-        groupadd tahoelafs
620
+    if [ -d $TAHOE_DIR ]; then
621
+        deluser --remove-all-files tahoelafs
622
+        delgroup tahoelafs
623
+        rm -rf $TAHOE_DIR
626 624
     fi
627 625
 
626
+    # create a user
627
+    adduser --disabled-login --gecos 'tahoe-lafs' tahoelafs
628
+    adduser tahoelafs debian-tor
629
+    groupadd tahoelafs
630
+
628 631
     apt-get -yq install tahoe-lafs
629 632
     pip install tahoe-lafs[tor]
630 633