From: Frank Brehm Date: Wed, 8 Nov 2017 16:51:57 +0000 (+0100) Subject: Moved dns-deploy-zones -> bin/ X-Git-Tag: 0.1.2~99 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=d8c977b6b006cd1372ac7e751e6aa352f5734127;p=pixelpark%2Fadmin-tools.git Moved dns-deploy-zones -> bin/ --- diff --git a/bin/dns-deploy-zones b/bin/dns-deploy-zones new file mode 100755 index 0000000..ddfb931 --- /dev/null +++ b/bin/dns-deploy-zones @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 + +# Standard modules +import sys +import os +import logging +import locale + +# own modules: +cur_dir = os.getcwd() +base_dir = cur_dir + +if sys.argv[0] != '' and sys.argv[0] != '-c': + bin_dir = os.path.dirname(sys.argv[0]) +base_dir = os.path.abspath(os.path.join(bin_dir, '..')) +module_dir = os.path.join(base_dir, 'pp_lib') +if os.path.exists(module_dir): + sys.path.insert(0, base_dir) + +from pp_lib.config_named_app import PpConfigNamedApp + +log = logging.getLogger(__name__) + +__author__ = 'Frank Brehm ' +__copyright__ = '(C) 2017 by Frank Brehm, Pixelpark GmbH, Berlin' + +appname = os.path.basename(sys.argv[0]) + +locale.setlocale(locale.LC_ALL, '') + +app = PpConfigNamedApp(appname=appname) +app.initialized = True + +if app.verbose > 2: + print("{c}-Object:\n{a}".format(c=app.__class__.__name__, a=app)) + +app() + +sys.exit(0) + +# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/dns-deploy-zones b/dns-deploy-zones deleted file mode 100755 index cd50b74..0000000 --- a/dns-deploy-zones +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 - -# Standard modules -import sys -import os -import logging -import locale - -# own modules: -cur_dir = os.getcwd() -base_dir = cur_dir - -if sys.argv[0] != '' and sys.argv[0] != '-c': - cur_dir = os.path.dirname(sys.argv[0]) -if os.path.exists(os.path.join(cur_dir, 'pp_lib')): - sys.path.insert(0, os.path.abspath(cur_dir)) - -from pp_lib.config_named_app import PpConfigNamedApp - -log = logging.getLogger(__name__) - -__author__ = 'Frank Brehm ' -__copyright__ = '(C) 2017 by Frank Brehm, Pixelpark GmbH, Berlin' - -appname = os.path.basename(sys.argv[0]) - -locale.setlocale(locale.LC_ALL, '') - -app = PpConfigNamedApp(appname=appname) -app.initialized = True - -if app.verbose > 2: - print("{c}-Object:\n{a}".format(c=app.__class__.__name__, a=app)) - -app() - -sys.exit(0) - -# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4