aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2013-05-06 23:53:12 +0000
committerRob Austein <sra@hactrn.net>2013-05-06 23:53:12 +0000
commit44f0ddc2a7074b1db99cdbadeaff70945981cfdd (patch)
tree98126bc4e41d65de546b0034035992c3bba6d24a
parent83079b5637c88f08ec05fe215f71af0c660ea823 (diff)
Cleanup
svn path=/trunk/; revision=5326
-rwxr-xr-xrpkid/portal-gui/scripts/rpkigui-apache-conf-gen36
1 files changed, 18 insertions, 18 deletions
diff --git a/rpkid/portal-gui/scripts/rpkigui-apache-conf-gen b/rpkid/portal-gui/scripts/rpkigui-apache-conf-gen
index 3499f1d0..412e3171 100755
--- a/rpkid/portal-gui/scripts/rpkigui-apache-conf-gen
+++ b/rpkid/portal-gui/scripts/rpkigui-apache-conf-gen
@@ -81,6 +81,24 @@ vhost = '''\
''' % dict(rpki.autoconf.__dict__,
fqdn = fqdn)
+class Guess(object):
+
+ @classmethod
+ def dispatch(cls, args):
+ if sys.platform.startswith("freebsd"):
+ return FreeBSD(args)
+ if sys.platform.startswith("darwin"):
+ return Darwin(args)
+ try:
+ issue = open("/etc/issue", "r").read().split()[0]
+ except:
+ issue = None
+ if issue in ("Debian", "Ubunutu"):
+ return Debian(args)
+ if issue in ("Fedora", "CentOS"):
+ return Redhat(args)
+ raise NotImplementedError("Can't guess what to do with Apache on this platform, sorry")
+
class Abstract(object):
apache_cer = os.path.join(rpki.autoconf.sysconfdir, "rpki", "apache.cer")
@@ -208,24 +226,6 @@ class Abstract(object):
self.unlink(self.apache_conf)
self.del_certs()
-class Guess(Abstract):
-
- @classmethod
- def dispatch(cls, args):
- if sys.platform.startswith("freebsd"):
- return FreeBSD(args)
- if sys.platform.startswith("darwin"):
- return Darwin(args)
- try:
- issue = open("/etc/issue", "r").read().split()[0]
- except:
- issue = None
- if issue in ("Debian", "Ubunutu"):
- return Debian(args)
- if issue in ("Fedora", "CentOS"):
- return Redhat(args)
- raise NotImplementedError("Can't guess what to do with Apache on this platform, sorry")
-
class FreeBSD(Abstract):
# On FreeBSD we have to ask httpd what version it is before we know