User Tools

Site Tools


linux:notifications

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:notifications [2020/07/25 22:21] Wulf Rajeklinux:notifications [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 37: Line 37:
 } }
  
 +HOSTNAME_TO_IGNORE_REGEX="\.example\.com"
 #VNC loop #VNC loop
 while true while true
 do do
-  LOGGEDON=$(netstat -a -n | grep ":5900" | grep ESTABLISHED | sed 's/.*:5900 *\(.*\):.*/\1/g' | while read i; do host -t CNAME $i | head -1; done | sed 's/.* \(.*\)\.amatiglobal\.com\./\1/g')+  LOGGEDON=$(netstat -a -n | grep ":5900" | grep ESTABLISHED | sed 's/.*:5900 *\(.*\):.*/\1/g' | while read i; do host -t CNAME $i | head -1; done | sed 's/.* \(.*\)$HOSTNAME_TO_IGNORE_REGEX\./\1/g')
   if [ "`echo $LOGGEDON|wc -l`" -lt "2" ]   if [ "`echo $LOGGEDON|wc -l`" -lt "2" ]
   then   then
linux/notifications.1595712092.txt.gz · Last modified: 2023/05/29 11:53 (external edit)