Add basic support for installing CORE Office (aka. Fannie)
plus various other things, to that end
This commit is contained in:
parent
bd4768839a
commit
93c2db902e
5 changed files with 159 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -214,6 +214,26 @@ class Deployer(object):
|
|||
from rattail_fabric2.backup import deploy_backup_app
|
||||
deploy_backup_app(c, self, envname, *args, **kwargs)
|
||||
|
||||
def certbot_account(self, c, uuid, localdir='certbot/account'):
|
||||
"""
|
||||
Deploy files to establish a certbot account on target server
|
||||
"""
|
||||
from .util import exists
|
||||
|
||||
localdir = localdir.rstrip('/')
|
||||
paths = [
|
||||
'/etc/letsencrypt/accounts',
|
||||
'/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org',
|
||||
'/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory',
|
||||
]
|
||||
final_path = '{}/{}'.format(paths[-1], uuid)
|
||||
paths.append(final_path)
|
||||
if not exists(c, final_path, use_sudo=True):
|
||||
mkdir(c, paths, mode='0700', use_sudo=True)
|
||||
self.deploy(c, '{}/private_key.json'.format(localdir), '{}/private_key.json'.format(final_path), mode='0600', use_sudo=True)
|
||||
self.deploy(c, '{}/meta.json'.format(localdir), '{}/meta.json'.format(final_path), use_sudo=True)
|
||||
self.deploy(c, '{}/regr.json'.format(localdir), '{}/regr.json'.format(final_path), use_sudo=True)
|
||||
|
||||
|
||||
def make_deploy(deploy_path, last_segment='deploy'):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue