From 6b52a6fa019c5dbfd5a9eb13c84b410a5ab884b8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 8 Sep 2016 10:31:05 +0100 Subject: [PATCH] Run ipfs bootstrap command as user --- src/zeronetavahi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zeronetavahi b/src/zeronetavahi index 61e817d0..ef92ddbb 100755 --- a/src/zeronetavahi +++ b/src/zeronetavahi @@ -130,7 +130,7 @@ function ipfs_bootstrap { ipfs_txt=$(echo "$line" | awk -F '[' '{print $2}' | awk -F ']' '{print $1}' | awk -F '"' '{print $2}') ipfs_peer_id=$(echo "$ipfs_txt" | awk -F ':' '{print $1}') ipfs_tox_id=$(echo "$ipfs_txt" | awk -F ':' '{print $2}') - $IPFS_COMMAND bootstrap add /ip4/${address}/tcp/${IPFS_PORT}/ipfs/${ipfs_peer_id} + su -c "$IPFS_COMMAND bootstrap add /ip4/${address}/tcp/${IPFS_PORT}/ipfs/${ipfs_peer_id}" - $MY_USERNAME if [ -d /home/$MY_USERNAME/Desktop ]; then if [[ $ipfs_tox_id != 'none' ]]; then echo "$ipfs_tox_id:$ipfs_peer_id" >> ${IPFS_USERS_FILE}.new