#!/bin/bash


# Following variables are used to store the color codes for displaying the content on terminal
# red="\033[0;31m" ;
# green="\033[0;32m" ;
# brown="\033[0;33m" ;
# blue="\033[0;34m" ;
# cyan="\033[0;36m" ;
# reset="\033[0m" ;

black="\033[0;90m" ;
red="\033[0;91m" ;
green="\033[0;92m" ;
brown="\033[0;93m" ;
blue="\033[0;94m" ;
purple="\033[0;95m" ;
cyan="\033[0;96m" ;
grey="\033[0;97m" ;
white="\033[0;98m" ;
reset="\033[0m" ;

sudo dmesg -n1


echo -e "\n${brown} Output of : \nBuddy.sitewide_all_active_buddies().count() and \nBuddy.get_active_buddies_user_ids_list() ${reset}" ;
docker exec -it gstudio /bin/sh -c "cd /home/docker/code/gstudio/gnowsys-ndf/ && echo \"from gnowsys_ndf.ndf.models import * ; Buddy.sitewide_all_active_buddies().count() ; Buddy.get_active_buddies_user_ids_list();\" | python manage.py shell ;"

docker exec -it gstudio /bin/sh -c "cd /home/docker/code/gstudio/gnowsys-ndf/ && echo \"execfile('/data/logout_all_users.py')\" | python manage.py shell ;"

echo -e "\n${brown} Output of : \nBuddy.sitewide_all_active_buddies().count() and \nBuddy.get_active_buddies_user_ids_list() ${reset}" ;
docker exec -it gstudio /bin/sh -c "cd /home/docker/code/gstudio/gnowsys-ndf/ && echo \"from gnowsys_ndf.ndf.models import * ; Buddy.sitewide_all_active_buddies().count() ; Buddy.get_active_buddies_user_ids_list();\" | python manage.py shell ;"


exit

