瀏覽代碼

Check that ipfs was installed

Bob Mottram 8 年之前
父節點
當前提交
79a26d1a38
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. 6
    2
      src/freedombone-app-ipfs

+ 6
- 2
src/freedombone-app-ipfs 查看文件

@@ -215,8 +215,12 @@ function install_ipfs_js {
215 215
 
216 216
     IPFS_PATH=/usr/local/bin
217 217
 
218
+    if [ ! -f $IPFS_PATH/jsipfs ]; then
219
+        exit 637292
220
+    fi
221
+
218 222
     # initialise
219
-    su -c "$IPFS_PATH/ipfs init -b 4096" - $MY_USERNAME
223
+    su -c "$IPFS_PATH/jsipfs init -b 4096" - $MY_USERNAME
220 224
     if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
221 225
         echo "IPFS could not be initialised for user $MY_USERNAME"
222 226
         exit 7358
@@ -261,7 +265,7 @@ function install_ipfs_js {
261 265
     systemctl restart ${IPFS_DAEMON_NAME}
262 266
 
263 267
     if [ -d /etc/avahi ]; then
264
-        su -c "echo $($IPFS_PATH/ipfs id | grep '\"ID\":' | awk -F '\"' '{print $4}') > /tmp/ipfsid" - $MY_USERNAME
268
+        su -c "echo $($IPFS_PATH/jsipfs id | grep '\"ID\":' | awk -F '\"' '{print $4}') > /tmp/ipfsid" - $MY_USERNAME
265 269
         if [ ! -f /tmp/ipfsid ]; then
266 270
             echo 'No IPFS identity was created'
267 271
             exit 37895