Sfoglia il codice sorgente

Check that ipfs was installed

Bob Mottram 8 anni fa
parent
commit
79a26d1a38
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6
    2
      src/freedombone-app-ipfs

+ 6
- 2
src/freedombone-app-ipfs Vedi File

215
 
215
 
216
     IPFS_PATH=/usr/local/bin
216
     IPFS_PATH=/usr/local/bin
217
 
217
 
218
+    if [ ! -f $IPFS_PATH/jsipfs ]; then
219
+        exit 637292
220
+    fi
221
+
218
     # initialise
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
     if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
224
     if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
221
         echo "IPFS could not be initialised for user $MY_USERNAME"
225
         echo "IPFS could not be initialised for user $MY_USERNAME"
222
         exit 7358
226
         exit 7358
261
     systemctl restart ${IPFS_DAEMON_NAME}
265
     systemctl restart ${IPFS_DAEMON_NAME}
262
 
266
 
263
     if [ -d /etc/avahi ]; then
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
         if [ ! -f /tmp/ipfsid ]; then
269
         if [ ! -f /tmp/ipfsid ]; then
266
             echo 'No IPFS identity was created'
270
             echo 'No IPFS identity was created'
267
             exit 37895
271
             exit 37895