rewrite done
This commit is contained in:
24
utils/manage_heipv6.py
Executable file
24
utils/manage_heipv6.py
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import he_ipv6
|
||||
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
def main():
|
||||
_args = he_ipv6.args.parseArgs().parse_args()
|
||||
logger.debug('Invoked with args: {0}'.format(vars(_args)))
|
||||
tb = he_ipv6.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()
|
||||
Reference in New Issue
Block a user