mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
work
This commit is contained in:
@@ -7,11 +7,31 @@ from ssh_lib.utils import (
|
||||
)
|
||||
|
||||
|
||||
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_base(c):
|
||||
pkg_list = [
|
||||
'lsb-release',
|
||||
'wget',
|
||||
'git',
|
||||
'build-essential',
|
||||
'unzip',
|
||||
'rsync',
|
||||
'btrfs-progs',
|
||||
'pigz',
|
||||
#
|
||||
'gnupg2',
|
||||
'gnupg-agent',
|
||||
'ca-certificates',
|
||||
'ubuntu-keyring',
|
||||
#
|
||||
'nload',
|
||||
'iftop',
|
||||
'vnstat',
|
||||
#
|
||||
'python3',
|
||||
'python3-venv',
|
||||
]
|
||||
|
||||
apt_get_install(c, ' '.join(pkg_list))
|
||||
|
||||
|
||||
def pkg_clean(c):
|
||||
@@ -34,25 +54,8 @@ def pkg_clean(c):
|
||||
c.sudo('iptables -L', warn=True)
|
||||
|
||||
|
||||
def pkg_base(c):
|
||||
pkg_list = [
|
||||
'lsb-release',
|
||||
'wget',
|
||||
'git',
|
||||
'build-essential',
|
||||
'unzip',
|
||||
#
|
||||
'gnupg2',
|
||||
'gnupg-agent',
|
||||
'ca-certificates',
|
||||
'ubuntu-keyring',
|
||||
#
|
||||
'nload',
|
||||
'iftop',
|
||||
'vnstat',
|
||||
#
|
||||
'python3',
|
||||
'python3-venv',
|
||||
]
|
||||
|
||||
apt_get_install(c, ' '.join(pkg_list))
|
||||
def pkg_upgrade(c):
|
||||
apt_get_update(c)
|
||||
c.sudo(
|
||||
'DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold"'
|
||||
)
|
||||
|
||||
@@ -4,12 +4,17 @@ import string
|
||||
|
||||
|
||||
def put(
|
||||
c, local_path, remote_path, permissions=None, owner='root', group=None, target_is_dir=False
|
||||
c, local_path, remote_path, permissions=None, owner='root', group=None, create_parent_dir=False
|
||||
):
|
||||
tmp_path = f'/tmp/fabtmp_{random_string(8)}'
|
||||
c.put(local_path, tmp_path)
|
||||
|
||||
if is_dir(c, remote_path) or target_is_dir:
|
||||
if create_parent_dir:
|
||||
dirname = os.path.dirname(remote_path)
|
||||
c.sudo(f'mkdir -p {dirname}')
|
||||
set_permission(c, dirname, owner=owner, group=group)
|
||||
|
||||
if is_dir(c, remote_path):
|
||||
if not remote_path.endswith('/'):
|
||||
remote_path += '/'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user