Adaptation à jessie sur les tty

This commit is contained in:
Gabriel Detraz 2015-07-02 20:10:57 +02:00
parent 607c1b8855
commit 12e755fa64

View file

@ -85,7 +85,7 @@ def liste_2b(warn_mail=[]):
# Utilisateurs connectés sur vo sur place
if gethostname() == 'vo':
cprint('---=== W(ho) sur vo ===---', 'bleu')
ttyfound = system("/usr/bin/w -s | grep tty`fgconsole`")
ttyfound = system("/usr/bin/w -s | grep ?xdm?")
print ''
# Conclusion
@ -93,7 +93,7 @@ def liste_2b(warn_mail=[]):
cprint("---=== Il y a du monde au 2B ! ===---", 'vert')
else:
cprint("---=== Il semble n'y avoir personne au 2B ... ===---", 'rouge')
if __name__ == '__main__':
if '--warn-tpe' in sys.argv:
liste_2b(warn_mail=["terminal"])