Add basic support for installing CORE Office (aka. Fannie)

plus various other things, to that end
This commit is contained in:
Lance Edgar 2019-02-09 17:20:22 -06:00
parent bd4768839a
commit 93c2db902e
5 changed files with 159 additions and 2 deletions

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2018 Lance Edgar
# Copyright © 2010-2019 Lance Edgar
#
# This file is part of Rattail.
#
@ -57,6 +57,16 @@ def enable_mod(c, *names):
c.sudo('a2enmod {}'.format(name))
def enable_port(c, port):
"""
Tell Apache to listen on the given port.
"""
if not isinstance(port, int) and not port.isdigit():
raise ValueError("port must be an integer")
if c.run("grep '^Listen {}' /etc/apache2/ports.conf".format(port), warn=True).failed:
c.sudo("""bash -c 'echo "Listen {}" >> /etc/apache2/ports.conf'""".format(port))
def enable_site(c, *names):
"""
Enable the given Apache site(s)