named_redirect package¶
Submodules¶
named_redirect.skeleton module¶
This is a skeleton file that can serve as a starting point for a Python console script. To run this script uncomment the following line in the entry_points section in setup.py:
[console_scripts] fibonacci = named_redirect.skeleton:run
Then run python setup.py install which will install the command fibonacci inside your current environment. Besides console scripts, the header (i.e. until _logger…) of this file can also be used as template for Python modules.
Note: This skeleton file can be safely removed if not needed!
-
named_redirect.skeleton.
check_internet
()[source]¶ Check for internet connectivity
Args:
Returns: Whether connected to the internet or not Return type: bool
-
named_redirect.skeleton.
main
(args)[source]¶ Main entry point allowing external calls
Parameters: args ([str]) – command line parameter list
-
named_redirect.skeleton.
parse_args
(args)[source]¶ Parse command line parameters
Parameters: args ([str]) – command line parameters as list of strings Returns: command line parameters namespace Return type: argparse.Namespace
-
named_redirect.skeleton.
reconfigure_bind9
(dns_jail_enabled=False)[source]¶ Reconfigure bind9 to serve as a DNS jail or not depending on argument provided.
Parameters: dns_jail – Whether to reconfigure as a dns jail or not Returns: Whether operation was successful or not Return type: bool