routerbox/utils/manage_heipv6.py
2020-05-12 18:13:42 -04:00

25 lines
492 B
Python
Executable File

#!/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()