mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
rename
This commit is contained in:
38
ssh_lib/pkg_base.py
Normal file
38
ssh_lib/pkg_base.py
Normal file
@@ -0,0 +1,38 @@
|
||||
from ssh_lib.utils import (
|
||||
apt_get_autoremove,
|
||||
apt_get_install,
|
||||
apt_get_purge,
|
||||
apt_get_update,
|
||||
sudo_cmd,
|
||||
)
|
||||
|
||||
|
||||
def pkg_upgrade(c):
|
||||
apt_get_update(c)
|
||||
c.sudo(
|
||||
'DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold"'
|
||||
)
|
||||
|
||||
|
||||
def pkg_clean(c):
|
||||
clean_list = [
|
||||
# firewalls
|
||||
'ufw',
|
||||
'nftables',
|
||||
'firewalld',
|
||||
'iptables-persistent',
|
||||
# bloat
|
||||
'ntfs-3g',
|
||||
'popularity-contest',
|
||||
'landscape*',
|
||||
'ubuntu-advantage-tools',
|
||||
]
|
||||
|
||||
apt_get_purge(c, ' '.join(clean_list))
|
||||
apt_get_autoremove(c)
|
||||
sudo_cmd(c, 'dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs -r dpkg --purge')
|
||||
c.sudo('iptables -L')
|
||||
|
||||
|
||||
def pkg_base(c):
|
||||
apt_get_install(c, 'python3 nload iftop')
|
||||
Reference in New Issue
Block a user