From 47f92b8365af8dcd23315a00512773d69012e280 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 12 Sep 2016 15:21:03 +0100 Subject: [PATCH] Move ipfs users to tmp --- src/freedombone-image-customise | 2 +- src/freedombone-image-mesh | 4 ---- src/freedombone-mesh-visit-site | 2 +- src/meshavahi | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 77303d41..84c1ee71 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -779,7 +779,7 @@ if [ \$no_of_users -gt 0 ]; then chmod +x /home/$MY_USERNAME/Desktop/Users.desktop chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/Users.desktop - if [ -f /home/$MY_USERNAME/.ipfs-users ]; then + if [ -f /tmp/.ipfs-users ]; then echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/sites.desktop echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/sites.desktop echo "Name=Visit a site" >> /home/$MY_USERNAME/Desktop/sites.desktop diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index c285aff6..6834eae3 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -482,10 +482,6 @@ function setup_ipfs { shred -zu /home/$MY_USERNAME/.ipfs-public fi - if [ -f /home/$MY_USERNAME/.ipfs-users ]; then - shred -zu /home/$MY_USERNAME/.ipfs-users - fi - su -c "$IPFS_COMMAND init -b $IPFS_KEY_LENGTH" - $MY_USERNAME if [ ! -d /home/$MY_USERNAME/.ipfs ]; then echo "IPFS could not be initialised for user $MY_USERNAME" >> $INSTALL_LOG diff --git a/src/freedombone-mesh-visit-site b/src/freedombone-mesh-visit-site index 84cbdc84..28b297fb 100755 --- a/src/freedombone-mesh-visit-site +++ b/src/freedombone-mesh-visit-site @@ -40,7 +40,7 @@ BROWSER_OPTIONS='-p' # An optional suffix to be appended to the URL SUFFIX=$1 -IPFS_USERS_FILE=/home/$USER/.ipfs-users +IPFS_USERS_FILE=/tmp/.ipfs-users if [ ! -f $IPFS_USERS_FILE ]; then exit 0 fi diff --git a/src/meshavahi b/src/meshavahi index 326c43b6..c5cf2564 100755 --- a/src/meshavahi +++ b/src/meshavahi @@ -39,7 +39,7 @@ MY_USERNAME=$MESH_USERNAME IPFS_PORT=4001 IPFS_PATH=/usr/bin IPFS_COMMAND=$IPFS_PATH/ipfs -IPFS_USERS_FILE=/home/$MY_USERNAME/.ipfs-users +IPFS_USERS_FILE=/tmp/.ipfs-users IPFS_PUBLIC=/home/$MY_USERNAME/.ipfs-public # contains the output of the avahi command