Commit 654517aa authored by Benjamin Graillot's avatar Benjamin Graillot Committed by root

Ajout du script whos

parent 48642875
import os
import shlex
import socket
import subprocess
import sys
if __name__ == '__main__':
host = socket.gethostname()
if host == 're2o-srv':
os.chdir('/var/www/re2o')['sudo', './', 'whos'] + sys.argv[1:])
elif host == 'thot':
os.system('ssh -t whos ' + shlex.quote(' '.join([shlex.quote(arg) for arg in sys.argv[1:]])))
print('Commande à lancer uniquement sur thot ou re2o-srv.')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment