Store mesh users list on tmp

This commit is contained in:
Bob Mottram 2016-09-12 15:16:55 +01:00
parent bc740ddb12
commit 858492fc9b
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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