provisioning tool for building opinionated architecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
320 B

10 months ago
  1. #!/bin/bash
  2. RED='\033[0;31m'
  3. NC='\033[0m' # No Color
  4. USERS=$(
  5. w -uh
  6. )
  7. if [ -n "$USERS" ]; then
  8. echo '-----------------------------------------------'
  9. echo -e "${RED}Beware,${NC} there is another connected user${RED}"
  10. echo "$USERS"
  11. echo -e "${NC}-----------------------------------------------"
  12. fi