Browse Source

Remove any existing tahoelafs install

Bob Mottram 7 years ago
parent
commit
d9f3dbff03
1 changed files with 9 additions and 6 deletions
  1. 9
    6
      src/freedombone-app-tahoelafs

+ 9
- 6
src/freedombone-app-tahoelafs View File

617
 
617
 
618
     apt-get -yq install build-essential python-pip python-dev libffi-dev libssl-dev
618
     apt-get -yq install build-essential python-pip python-dev libffi-dev libssl-dev
619
     apt-get -yq install libcrypto++-dev python-pycryptopp python-cffi python-virtualenv
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
     fi
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
     apt-get -yq install tahoe-lafs
631
     apt-get -yq install tahoe-lafs
629
     pip install tahoe-lafs[tor]
632
     pip install tahoe-lafs[tor]
630
 
633