浏览代码

Use a different tmp directory

Bob Mottram 8 年前
父节点
当前提交
bd29f31007
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7
    2
      src/freedombone-app-tahoelafs

+ 7
- 2
src/freedombone-app-tahoelafs 查看文件

@@ -217,9 +217,12 @@ function install_tahoelafs {
217 217
     cd /home/tahoelafs/tahoelafs
218 218
     git checkout $TAHOELAFS_COMMIT -b $TAHOELAFS_COMMIT
219 219
     git submodule update --init --recursive
220
+    export TMPDIR=/home/tahoelafs/tmp
221
+    if [ ! $TMPDIR ]; then
222
+        mkdir $TMPDIR
223
+    fi
220 224
     virtualenv venv --distribute
221 225
     venv/bin/pip uninstall --yes setuptools
222
-    rm -rf /tmp/*
223 226
     venv/bin/pip install setuptools==11.3
224 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 228
     venv/bin/pip install cryptography==1.7.2 markerlib==0.6.0 distribute==0.7.3
@@ -245,6 +248,7 @@ function install_tahoelafs {
245 248
     su -c "$TAHOE_COMMAND create-introducer -C /home/tahoelafs/data --hide-ip --hostname=127.0.0.1" - tahoelafs
246 249
     TAHOELAFS_CONFIG=/home/tahoelafs/data/tahoe.cfg
247 250
     if [ ! -f $TAHOELAFS_CONFIG ]; then
251
+        export TMPDIR=/tmp
248 252
         exit 62831
249 253
     fi
250 254
 
@@ -276,7 +280,8 @@ function install_tahoelafs {
276 280
     systemctl start tahoelafs
277 281
 
278 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 286
     APP_INSTALLED=1
282 287
 }