|
@@ -715,7 +715,11 @@ function configure_user_interface {
|
715
|
715
|
cat <<EOF > $rootdir/usr/bin/list-tox-users
|
716
|
716
|
#!/bin/bash
|
717
|
717
|
users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d)
|
718
|
|
-no_of_users=\$(echo "\$users_list" | wc -l)
|
|
718
|
+if [ ! \$users_list ]; then
|
|
719
|
+ no_of_users=0
|
|
720
|
+else
|
|
721
|
+ no_of_users=\$(echo "\$users_list" | wc -l)
|
|
722
|
+fi
|
719
|
723
|
if [ \$no_of_users -gt 0 ]; then
|
720
|
724
|
echo "\$users_list" > /home/$MY_USERNAME/Users.txt
|
721
|
725
|
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Users.txt
|