X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=blobdiff_plain;f=keys%2Fsetup.py;h=8900bf98c9d3733cb6ccf777a14485be02864736;hp=fd04125505df8ea9ba8e3ca278f2efcde60eecfc;hb=06d54a80aa888ed335c14761a6730e4bf806cd44;hpb=6e9123c75a0283f12e5f8d138c631e96aebfe40b diff --git a/keys/setup.py b/keys/setup.py index fd04125..8900bf9 100644 --- a/keys/setup.py +++ b/keys/setup.py @@ -7,10 +7,23 @@ # privilges in order to setup an ssh key, add a user, and upload the key to # the user, make the user a member of the PLC site, etc. -import auth -import plc import sys import os +try: + import auth +except: + print """ + Create a file named: 'auth.py' which contains two variables: + +plc = "https://yourplc.hostname.org/PLCAPI/" +auth = {'Username': 'root@localhost.localdomain', + 'AuthMethod': 'password', + 'AuthString': 'root'} + +""" + sys.exit(1) + +import plc def filevalue(filename): f = open(filename, 'r')