tis-basic-config icon

TIS Base Linux

Paquet d’installation silencieuse pour TIS Base Linux

1-9

  • package: tis-basic-config
  • name: TIS Base Linux
  • version: 1-9
  • categories: System and network
  • maintainer: Kévin Guérineau
  • editor: Tranquil IT
  • locale: all
  • target_os: debian
  • architecture: all
  • signature_date:
  • size: 11.93 Ko

package           : tis-basic-config
version           : 1-9
architecture      : all
section           : base
priority          : optional
name              : TIS Base Linux
categories        : System and network
maintainer        : Kévin Guérineau
description       : Basic configuration package for Linux servers.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : debian
min_wapt_version  : 2.2
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Paquet de configuration de base des serveurs Linux.
description_pl    : Podstawowy pakiet konfiguracyjny dla serwerów Linux.
description_de    : Paket für die Grundkonfiguration von Linux-Servern.
description_es    : Paquete de configuración básica para servidores Linux.
description_pt    : Pacote de configuração básica para servidores Linux.
description_it    : Pacchetto di configurazione di base per server Linux.
description_nl    : Basisconfiguratiepakket voor Linux-servers.
description_ru    : Базовый пакет конфигурации для Linux-серверов.
audit_schedule    : 
editor            : Tranquil IT
keywords          : 
licence           : 
homepage          : 
package_uuid      : 884b7195-9c85-4b1d-bc58-0e9bf7c6662a
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 7891f1ca19ac8a9e41cb2963c0833bb3424a1dcc3f89e6ae484b1841a67063b2
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : P/VajprM0wDOFmpvpycMKXM6rbisJdEHHHmrXA8q8H0ajA6xRpPCSmV6U+wx8ak9BdPezIAdcK2TSd6Cg+A/lekW82LtGf30+gBO8I0Xu0q7vDjq5tUcjXBoQ7cICzO9K8K/w/giXh9ZPvxVm+ANG88jfbJ0CX0c1JIcd1xQyOh/0wL1PtaepoB+xnJsrQjqfo1Rr1pCn3HNV62WK9hLr8MYBUhuU/1OgsZ0o2ZIRg4vg4bdVcyFEaGZc2Ywr+nPwH4uVaHSlAIu4TXlypENHpQ/Y5LVgI7WigpadISkGXGf/LdAX58hdOWZ7wSaRhw7RFls2KF4mIRWOfoHC4KJiQ==
signature_date    : 2023-08-02T18:00:11.496018
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes

# -*- coding: utf-8 -*-
from setuphelpers import *

appli_list = ['vim', 'locate', 'ssh', 'rsync', 'arping', 'traceroute', 'nmap', 'telnet', 'iftop',
'dnsutils', 'ethtool', 'iotop', 'screen', 'less', 'psmisc', 'ntpdate', 'tcpdump', 'tree',
'pciutils', 'usbutils', 'lsof', 'mtr-tiny', 'tmux', 'strace', 'htop', 'netcat-openbsd',
'sudo', 'apt-transport-https', 'net-tools', 'gnupg2','ntp','lsb-release','dos2unix','curl']

use_apt_packages = False
use_swapfile = False
use_vim = False
use_old_naming = False
use_bashrc = False
pdiff = False

def install():
    print('Installing %s' % control.asrequirement())

    if use_apt_packages:
        for appli in appli_list:
            print(f'Install {appli}')
            install_apt(appli)

    if use_swapfile:
        print('Create swapfile')
        swapfile = makepath('/var','swapfile')
        if not isfile(swapfile):
            run(f'dd if=/dev/zero of={swapfile} bs=1M count=1024')
            run(f'chmod 0600 {swapfile}')
            run(f'mkswap -c {swapfile}')
            run(f'swapon {swapfile}')
            run(f'echo "{swapfile}   none    swap    sw      0 0" >> /etc/fstab')
            run('mount -a')

    if use_vim:
        print('Configure vim')
        vim_version = installed_softwares('vim')[0]['version'].split(':')[1].split('-')[0]
        vim_version = vim_version.split('.')[0] + vim_version.split('.')[1]
        vim_path = f'/usr/share/vim/vim{vim_version}/defaults.vim'
        vim_path_dir = f'/usr/share/vim/vim{vim_version}'

        if not isdir(vim_path_dir):
            mkdirs(vim_path_dir)
        filecopyto(r'files/vimrc',makepath('/etc','vim','vimrc'))
        if isfile(vim_path):
            remove_file(vim_path)
        filecopyto(r'files/defaults.vim',vim_path)

    if use_old_naming:
        print('Use old network interface naming')
        if isfile('/etc/default/grub'):
            run(r"sed -i 's/#GRUB_DISABLE_LINUX_UUID=true/GRUB_DISABLE_LINUX_UUID=true/' /etc/default/grub")
            run(r"sed -i 's/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/' /etc/default/grub")
            run(r"sed -i 's/allow-hotplug/auto/' /etc/network/interfaces")
            run('update-grub')

    if use_bashrc:
        print('Copy .bashrc')
        filecopyto(r'files/bashrc_root',r'/root/.bashrc')
        filecopyto(r'files/bashrc_tisadmin',r'/home/tisadmin/.bashrc')

    if pdiff:
        print('Disable APT pdiff')
        run('echo \'Acquire::PDiffs "false";\' > /etc/apt/apt.conf.d/disable-pdiff.conf')

# -*- coding: utf-8 -*-
from setuphelpers import *

def update_package():
    commit_count = params.get("commit_count",0)

    control.version = commit_count
    control.save_control_to_wapt()

24a94c2ddb60fe6046de564e8d5e2ea971ef681d7009cb6e2e8034653b0ffa24 : files/bashrc_root
44334fd131e1443151e9027fc0e5855874b7f30d909b64bd30a24ff479fdb302 : files/bashrc_tisadmin
850f1fb2417461327625dca46c6315c20b6982dd23da073e560eee83f1a05bc6 : files/defaults.vim
c5a969a3cd5f8b1c461a8d2fb0c4a7a22677a4c3576e6dfc429c5a5f23e178ce : files/vimrc
d3032935ff12b11ae0e7f5ec959054851b518ecd8e0269cfc65cfc62d4ca63f9 : setup.py
0506431355ece6d296efc398fc457515203e9532b5caa24d3e4c3d28dd277059 : update_package.py
7891f1ca19ac8a9e41cb2963c0833bb3424a1dcc3f89e6ae484b1841a67063b2 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
478c4d6c01305898bf06086f4d95dc772c4162d42ea185a561f50f74ddbd7173 : luti.json
05214675597247a5986a9eeebc2d1c01e7c7767e7ea577d50dea9b77629215fa : WAPT/control