This commit is contained in:
Zsolt Ero
2023-12-05 23:58:27 +01:00
parent fab71939ad
commit 0f81a008d8
4 changed files with 20 additions and 9 deletions

View File

@@ -51,12 +51,13 @@ def nginx(c):
def certbot(c):
# https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx
apt_get_install(c, 'snapd')
c.sudo('snap install core', warn=True)
# this is silly, but needs to be run twice
c.sudo('snap install core', warn=True, echo=True)
c.sudo('snap install core', warn=True, echo=True)
c.sudo('snap refresh core', warn=True)
apt_get_purge(c, 'certbot')
c.sudo('snap install --classic certbot', warn=True)
c.sudo('snap set certbot trust-plugin-with-root=ok')
c.sudo('snap install certbot-dns-cloudflare')

View File

@@ -15,7 +15,7 @@ def pkg_upgrade(c):
def pkg_clean(c):
clean_list = [
pkg_list = [
# firewalls
'ufw',
'nftables',
@@ -28,11 +28,21 @@ def pkg_clean(c):
'ubuntu-advantage-tools',
]
apt_get_purge(c, ' '.join(clean_list))
apt_get_purge(c, ' '.join(pkg_list))
apt_get_autoremove(c)
sudo_cmd(c, 'dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs -r dpkg --purge')
c.sudo('iptables -L')
c.sudo('iptables -L', warn=True)
def pkg_base(c):
apt_get_install(c, 'python3 nload iftop')
pkg_list = [
'wget',
'gpg',
'gnupg-agent',
'python3',
'nload',
'iftop',
'snapd',
]
apt_get_install(c, ' '.join(pkg_list))

View File

@@ -88,6 +88,7 @@ def apt_get_install(c, pkgs, warn=False):
c.sudo(
f'DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends {pkgs}',
warn=warn,
echo=True,
)