Run ipfs bootstrap command as user

This commit is contained in:
Bob Mottram 2016-09-08 10:31:05 +01:00
parent 6df08b2c93
commit 6b52a6fa01
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ function ipfs_bootstrap {
ipfs_txt=$(echo "$line" | awk -F '[' '{print $2}' | awk -F ']' '{print $1}' | awk -F '"' '{print $2}') 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_peer_id=$(echo "$ipfs_txt" | awk -F ':' '{print $1}')
ipfs_tox_id=$(echo "$ipfs_txt" | awk -F ':' '{print $2}') 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 [ -d /home/$MY_USERNAME/Desktop ]; then
if [[ $ipfs_tox_id != 'none' ]]; then if [[ $ipfs_tox_id != 'none' ]]; then
echo "$ipfs_tox_id:$ipfs_peer_id" >> ${IPFS_USERS_FILE}.new echo "$ipfs_tox_id:$ipfs_peer_id" >> ${IPFS_USERS_FILE}.new