Skip to content
Snippets Groups Projects
Unverified Commit 673a79bd authored by Bob Mottram's avatar Bob Mottram
Browse files

Special case when there are no tox users on the network

parent d20e0dc1
No related branches found
No related tags found
No related merge requests found
......@@ -715,7 +715,11 @@ function configure_user_interface {
cat <<EOF > $rootdir/usr/bin/list-tox-users
#!/bin/bash
users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d)
no_of_users=\$(echo "\$users_list" | wc -l)
if [ ! \$users_list ]; then
no_of_users=0
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment