Browse Source

Use a different tmp directory

Bob Mottram 8 years ago
parent
commit
bd29f31007
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      src/freedombone-app-tahoelafs

+ 7
- 2
src/freedombone-app-tahoelafs View File

217
     cd /home/tahoelafs/tahoelafs
217
     cd /home/tahoelafs/tahoelafs
218
     git checkout $TAHOELAFS_COMMIT -b $TAHOELAFS_COMMIT
218
     git checkout $TAHOELAFS_COMMIT -b $TAHOELAFS_COMMIT
219
     git submodule update --init --recursive
219
     git submodule update --init --recursive
220
+    export TMPDIR=/home/tahoelafs/tmp
221
+    if [ ! $TMPDIR ]; then
222
+        mkdir $TMPDIR
223
+    fi
220
     virtualenv venv --distribute
224
     virtualenv venv --distribute
221
     venv/bin/pip uninstall --yes setuptools
225
     venv/bin/pip uninstall --yes setuptools
222
-    rm -rf /tmp/*
223
     venv/bin/pip install setuptools==11.3
226
     venv/bin/pip install setuptools==11.3
224
     venv/bin/pip install six==1.10.0 packaging==16.8 attrs==16.3.0 appdirs==1.4.2 pycrypto==2.1.0 cffi==1.9.1
227
     venv/bin/pip install six==1.10.0 packaging==16.8 attrs==16.3.0 appdirs==1.4.2 pycrypto==2.1.0 cffi==1.9.1
225
     venv/bin/pip install cryptography==1.7.2 markerlib==0.6.0 distribute==0.7.3
228
     venv/bin/pip install cryptography==1.7.2 markerlib==0.6.0 distribute==0.7.3
245
     su -c "$TAHOE_COMMAND create-introducer -C /home/tahoelafs/data --hide-ip --hostname=127.0.0.1" - tahoelafs
248
     su -c "$TAHOE_COMMAND create-introducer -C /home/tahoelafs/data --hide-ip --hostname=127.0.0.1" - tahoelafs
246
     TAHOELAFS_CONFIG=/home/tahoelafs/data/tahoe.cfg
249
     TAHOELAFS_CONFIG=/home/tahoelafs/data/tahoe.cfg
247
     if [ ! -f $TAHOELAFS_CONFIG ]; then
250
     if [ ! -f $TAHOELAFS_CONFIG ]; then
251
+        export TMPDIR=/tmp
248
         exit 62831
252
         exit 62831
249
     fi
253
     fi
250
 
254
 
276
     systemctl start tahoelafs
280
     systemctl start tahoelafs
277
 
281
 
278
     set_completion_param "tahoelafs commit" "$TAHOELAFS_COMMIT"
282
     set_completion_param "tahoelafs commit" "$TAHOELAFS_COMMIT"
279
-    rm -rf /tmp/*
283
+    export TMPDIR=/tmp
284
+    rm -rf /home/tahoelafs/tmp
280
 
285
 
281
     APP_INSTALLED=1
286
     APP_INSTALLED=1
282
 }
287
 }