25 lines
486 B
Python
25 lines
486 B
Python
|
import logging
|
||
|
##
|
||
|
from . import args
|
||
|
from . import tunnelbroker
|
||
|
|
||
|
|
||
|
logger = logging.getLogger()
|
||
|
|
||
|
|
||
|
def main():
|
||
|
_args = args.parseArgs().parse_args()
|
||
|
logger.debug('Invoked with args: {0}'.format(vars(_args)))
|
||
|
tb = tunnelbroker.TunnelBroker(**vars(_args))
|
||
|
if _args.oper == 'start':
|
||
|
tb.start()
|
||
|
elif _args.oper == 'stop':
|
||
|
tb.stop()
|
||
|
elif _args.oper == 'update':
|
||
|
tb.update(oneshot = True)
|
||
|
return(None)
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|