From 858492fc9b8e95cc28191b94e020e70c464d9965 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 12 Sep 2016 15:16:55 +0100 Subject: [PATCH] Store mesh users list on tmp --- src/freedombone-image-customise | 10 +++++----- src/freedombone-mesh-visit-site | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 3a0564f6..77303d41 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -754,12 +754,12 @@ else no_of_users=\$(echo "\$users_list" | wc -l) fi if [ \$no_of_users -gt 0 ]; then - echo "\$users_list" > /home/$MY_USERNAME/Users.txt - chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Users.txt + echo "\$users_list" > /tmp/Users.txt + chown $MY_USERNAME:$MY_USERNAME /tmp/Users.txt echo 'showing_users=\$(ps aux | grep $MESH_TEXT_EDITOR | grep "Users.txt")' > /home/$MY_USERNAME/showusers echo 'if [ \${#showing_users} -eq 0 ]; then' >> /home/$MY_USERNAME/showusers - echo ' $MESH_TEXT_EDITOR /home/$MY_USERNAME/Users.txt' >> /home/$MY_USERNAME/showusers + echo ' $MESH_TEXT_EDITOR /tmp/Users.txt' >> /home/$MY_USERNAME/showusers echo 'fi' >> /home/$MY_USERNAME/showusers echo 'exit 0' >> /home/$MY_USERNAME/showusers chmod +x /home/$MY_USERNAME/showusers @@ -823,8 +823,8 @@ if [ \$no_of_users -gt 0 ]; then chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/tox.desktop fi else - if [ -f /home/$MY_USERNAME/Users.txt ]; then - rm /home/$MY_USERNAME/Users.txt + if [ -f /tmp/Users.txt ]; then + rm /tmp/Users.txt rm /home/$MY_USERNAME/Desktop/Users.desktop if [ -f /home/$MY_USERNAME/Desktop/Users.desktop ]; then rm /home/$MY_USERNAME/Desktop/Users.desktop diff --git a/src/freedombone-mesh-visit-site b/src/freedombone-mesh-visit-site index 2916b1de..84cbdc84 100755 --- a/src/freedombone-mesh-visit-site +++ b/src/freedombone-mesh-visit-site @@ -44,7 +44,7 @@ IPFS_USERS_FILE=/home/$USER/.ipfs-users if [ ! -f $IPFS_USERS_FILE ]; then exit 0 fi -USERS_FILE=/home/$USER/Users.txt +USERS_FILE=/tmp/Users.txt if [ ! -f $USERS_FILE ]; then exit 0 fi