#!/usr/bin/env bash # ======================================================================================================================================================== # # curl -L m.linuxuniverse.com.br | bash # ======================================================================================================================================================== # # Informations for the compliance Celeron: # enp1s0 = ETH0 # enp2s0 = ETH1 # eno1 (enp3s0) = ETH2 # MACVLAN = ETH3 export serverip="172.20.0.22" export usern4me="admin"; export passw0rd="isorulez" export lanhost="http://$serverip"; export wanhost="http://z.net-freaks.com:3434" export NEEDRESTART_MODE=a; export DEBIAN_FRONTEND=noninteractive export pathsrv="/srv/containers/scripts/config/install"; export destpath="/var/lib/libvirt/images" export github="https://raw.githubusercontent.com/urbancompasspony/docker/main/" # VM & Docker Only export list00="qemu-system qemu-utils qemu-user qemu-kvm qemu-guest-agent \ libvirt-clients libvirt-daemon-system bridge-utils virt-manager ovmf dnsmasq \ docker.io genisoimage" export list01="net-tools speedtest-cli whois w3m w3m-img netdiscover figlet iperf arp-scan traceroute sshpass fail2ban network-manager \ libatasmart-bin smartmontools zip unzip p7zip-full 7zip p7zip cifs-utils rsnapshot rclone iotop pluma \ haveged beep stress lm-sensors cmatrix btop inxi tree hwloc figlet dialog fail2ban btrfs-progs \ gpm tmux xinit xorg openbox pavucontrol caja epiphany-browser gparted cmatrix gnome-disk-utility terminator rdesktop unrar tree \ openvpn curl nmap parallel rsnapshot rclone openssh-server samba samba-dsdb-modules samba-vfs-modules build-essential" # ARM64 export package_2204="linux-modules-extra-raspi" export package_2404="docker-buildx" # ======================================================================================================================================================== # function root_check0 { [ "$EUID" -ne 0 ] || { clear echo "Não execute este script como Root! DICA: Remova o SUDO do comando ou execute-o como usuario local."; echo "" exit } } function hardsys0 { export sysmain="DISTRIB_RELEASE=22.04" sysversion=$(cat /etc/lsb-release | awk -F: '/RELEASE/ {print $0}' | awk '{print $1}') export hardmain="Celeron(R) J4125" hardversion=$(cat /proc/cpuinfo | grep 'model name' | head -n 1 | awk -F: '{ print $2 }' | cut -d ' ' -f 3,4) # Se hardware e sistema estão ok, é o Appliance! [ "$sysversion" = "$sysmain" ] && [ "$hardversion" = "$hardmain" ] && { appliance0 } || { # Se não é o Appliance, mas o Ubuntu é o adequado, verificar hardware... [ "$sysversion" = "$sysmain" ] && { # ...que pode ser aarch64... [ $(arch) = "aarch64" ] && { aarcharm0 } || { # ...ou generico. linite0 } } || { # Se o sistema não é adequado e o hardware é genérico, talvez seja o Endeavour: [ -f /usr/bin/pacman ] && { endeavour0S } || { # Se o sistema não é adequado, não é EndeavourOS e o hardware é genérico, prosseguir com cautela. clear; echo "" echo "SISTEMA OU HARDWARE INADEQUADO(S) DETECTADO!"; echo "" echo "O automatismo deste script exige o sistema 'Ubuntu Server 22.04 LTS' e voce esta usando o $sysversion"; echo "" echo "Da mesma forma este script exige o hardware 'Appliance 4x Gigabit Celeron J4125' e voce esta usando o $hardversion"; echo "" echo "Prosseguindo tentando os scripts basicos e o Modelo Linite de instalação Manual..."; echo ""; sleep 2 basicsys0 menuB } } } } function welcome0 { clear; echo ""; echo "Preparo de Servidor $1 by SuitIT®"; echo "" [ -f "$pathsrv"/finished ] || [ -f /home/administrador/.installed ] && { clear; echo ""; echo "Este servidor ja foi configurado previamente. Entrando no menu Linite Manual..."; sleep 3 menuB } || { [ -f "$pathsrv"/information ] && { echo "A senha foi previamente alterada. Use a nova senha!"; echo "" sudo echo . >/dev/null } || { echo "Insira a senha padrao: ubuntu"; echo "" sudo echo . >/dev/null } } echo ""; echo "5"; sleep 1; echo "4"; sleep 1; echo "3"; sleep 1; echo "2"; sleep 1; echo "1"; sleep 1 } function bashconf0 { clear; echo "Preparando sistema e configurando BASH"; echo "" sudo mkdir -p "$destpath"; sudo chmod 777 -R "$destpath"; sudo mkdir -p "$pathsrv" curl -sSL https://raw.githubusercontent.com/urbancompasspony/bashrc/main/install.sh | bash . .bashrc } function mkswap0 { [ -f /swapfile ] && { echo "." >/dev/zero } || { sudo dd if=/dev/zero of=/swapfile bs=1k count=1000000 sudo chmod 0600 /swapfile sudo mkswap /swapfile; sudo swapon /swapfile echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab } } function passmgr0 { [ -f "$pathsrv"/information ] && { clear; echo "Informacoes coletadas de uma instalacao anterior. Continuando."; echo ""; sleep 2 var1=$(sed -n '1p' "$pathsrv"/information) var2=$(sed -n '2p' "$pathsrv"/information) var3=$(sed -n '3p' "$pathsrv"/information) password0 } || { menupass0 sudo touch "$pathsrv"/information echo "$var1" | sudo tee "$pathsrv"/information [ "$var2" = "" ] && { echo "$var1" | sudo tee -a "$pathsrv"/information; } || { echo "$var2" | sudo tee -a "$pathsrv"/information; } [ "$var3" = "" ] && { echo "$var1" | sudo tee -a "$pathsrv"/information; } || { echo "$var3" | sudo tee -a "$pathsrv"/information; } password0 } } function menupass0 { VALUE1="Passw0rd"; VALUE2=""; VALUE3="" VALUE0=$(dialog --cancel-label "Sair da Instalacao" --ok-label "Iniciar Instalacao" --title "Novo Servidor" --form "Defina a senha do Administrador e as demais, caso fiquem em branco, serao a mesma:" 11 50 0 \ "Administrador:" 1 1 "$VALUE1" 1 15 40 0 \ "Senha XPRA:" 2 1 "$VALUE2" 2 15 40 0 \ "Senha PiHole:" 3 1 "$VALUE3" 3 15 40 0 \ 3>&1 1>&2 2>&3 3>&- > /dev/tty) [ $? -ne 0 ] && cancel_user var1=$(echo "$VALUE0" | sed -n 1p) var2=$(echo "$VALUE0" | sed -n 2p) var3=$(echo "$VALUE0" | sed -n 3p) check0 } function check0 { [ "$var1" = "" ] && { clear; echo ""; echo "Nao deixe o primeiro campo em branco!"; sleep 2; menu0 } || { echo . >/dev/null } } function cancel_user { clear; echo ""; echo "A INSTALACAO FOI CANCELADA PELO USUARIO."; echo "" exit } function timezone0 { [ -f "$pathsrv"/timezone_ok ] && { clear; echo "TimeZone ja foi configurado. Continuando."; echo ""; sleep 2 } || { sudo timedatectl set-timezone Etc/GMT+3 sudo timedatectl set-local-rtc 1 sudo touch "$pathsrv"/timezone_ok } } function useless0 { [ -f "$pathsrv"/useless_services ] && { clear; echo "Os pacotes inuteis ja foram removidos e desativados. Continuando."; echo ""; sleep 2 } || { clear; echo "Removendo pacotes e desativando servicos inuteis"; echo "" sudo apt purge needrestart cloud-init snapd unattended-upgrades plank deja-dup evolution evolution-data-server bluez blueman bluetooth -y sudo systemctl disable systemd-networkd-wait-online.service sudo systemctl mask systemd-networkd-wait-online.service sudo touch "$pathsrv"/useless_services } } function update0 { [ -f "$pathsrv"/update_ok ] && { clear; echo "O sistema ja foi atualizado e os pacotes necessarios instalados. Continuando."; echo ""; sleep 2 } || { clear; echo "Atualizando o sistema"; echo "" sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y; clear echo "Instalando pacotes...." sudo apt install $list00 $list01 $package_2404 --no-install-recommends -y && sync && sudo systemctl disable NetworkManager-wait-online.service sudo systemctl mask NetworkManager-wait-online.service sudo usermod -aG libvirt administrador sudo usermod -aG libvirt-qemu administrador sudo usermod -aG docker administrador sudo touch "$pathsrv"/update_ok } } function update_arm { [ -f "$pathsrv"/updatearm_ok ] && { clear; echo "O sistema ja foi atualizado e os pacotes necessarios instalados. Continuando."; echo ""; sleep 2 } || { clear; echo "Atualizando o sistema"; echo "" sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y; clear echo "Instalando pacotes...." sudo apt install $list01 $package_2204 --no-install-recommends -y && sync && sudo systemctl disable NetworkManager-wait-online.service sudo systemctl mask NetworkManager-wait-online.service sudo usermod -aG docker administrador sudo touch "$pathsrv"/updatearm_ok } } function update_basic { [ -f "$pathsrv"/update_ok ] && { clear; echo "O sistema ja foi atualizado e os pacotes necessarios instalados. Continuando."; echo ""; sleep 2 } || { clear; echo "Atualizando o sistema"; echo "" sudo apt update; sudo apt upgrade -y; sudo apt autoremove -y; clear echo "Instalando pacotes...." sudo apt install $list01 --no-install-recommends -y && sync && sudo systemctl disable NetworkManager-wait-online.service sudo systemctl mask NetworkManager-wait-online.service sudo usermod -aG docker administrador sudo touch "$pathsrv"/update_ok } } function password0 { [ -f "$pathsrv"/password_ok ] && { clear; echo "Senha substituida anteriormente. Continuando."; echo ""; sleep 2 } || { clear; echo "Trocando a senha do usuario ADMINISTRADOR deste servidor!" echo "administrador:$var1" | sudo chpasswd && sudo touch "$pathsrv"/password_ok } } function netplan0 { [ -f "$pathsrv"/netplan_ok ] && { clear; echo "O Netplan ja foi ajustado. Continuando."; echo ""; sleep 2 } || { sleep 3; clear; echo "Ajustando Netplan" echo -e " # This is the network config written by 'linite model-1' script network: ethernets: # renderer: NetworkManager eno1: dhcp4: true nameservers: addresses: [1.1.1.1, 8.8.8.8] enp1s0: dhcp4: true nameservers: addresses: [1.1.1.1, 8.8.8.8] enp2s0: dhcp4: true nameservers: addresses: [1.1.1.1, 8.8.8.8] enp4s0: dhcp4: false addresses: [172.25.0.3/24] routes: - to: default via: 192.168.0.1 nameservers: addresses: [1.1.1.1, 8.8.8.8] version: 2" | sudo tee /etc/netplan/00-installer-config.yaml sudo netplan apply && sudo touch "$pathsrv"/netplan_ok } } function netplan1 { [ -f "$pathsrv"/netplan_ok ] && { clear; echo "O Netplan ja foi ajustado. Continuando."; echo ""; sleep 2 } || { echo -e " # #network: # ethernets: # renderer: NetworkManager # enp4s0: # addresses: [192.168.250.10/24] # routes: # - to: default # via: 192.168.120.254 # dhcp4: no ## optional: true # nameservers: # addresses: [192.168.250.1] # #addresses: [200.225.197.34, 200.225.197.37] # #addresses: [200.175.89.139, 200.175.5.139] # #addresses: [8.8.4.4, 8.8.8.8] # #addresses: [1.1.1.1, 1.0.0.1] # version: 2" | sudo tee -a /etc/netplan/00-installer-config.yaml echo -e " # #network: # ethernets: # eth0: # dhcp4: true # optional: true # eth1: # THIS! # dhcp4: no # optional: true # addresses: [172.16.1.2/24] # version: 2" | sudo tee -a /etc/netplan/00-installer-config.yaml sudo touch "$pathsrv"/netplan_ok } } function macvlan0 { [ -f "$pathsrv"/macvlan_ok ] && { clear; echo "A MAVLAN ja foi configurada. Continuando."; echo ""; sleep 2 } || { sleep 3; clear; echo "Definindo MACVLAN para os containers" sudo docker network create -d macvlan --subnet="172.25.0.0"/24 --gateway="172.25.0.1" -o parent="enp4s0" macvlan && sudo touch "$pathsrv"/macvlan_ok } } function pfsense0 { [ -f "$pathsrv"/pfsense_ok ] && { clear; echo "O pfSense ja foi configurado. Continuando."; echo ""; sleep 2 } || { sleep 3; clear; echo "Adicionando pfSense como VM" if ping -c 1 $serverip >/dev/null; then webadress="$lanhost" else webadress="$wanhost" fi [ -f "$destpath"/"$1" ] && { sudo chmod 777 /var/run/libvirt/libvirt-sock } || { clear; sudo wget --user $usern4me --password $passw0rd $webadress/"$1" -O $destpath/"$1" && sudo chmod 777 /var/run/libvirt/libvirt-sock } sudo virt-install --import \ --name pfSense \ --boot hd,cdrom,menu=on \ --memory 2048 \ --vcpus 2 \ --cpu host \ --network type=direct,source=enp1s0,source_mode=bridge,mac=52:54:00:55:ea:01 \ --network type=direct,source=enp2s0,source_mode=bridge,mac=52:54:00:55:ea:02 \ --network type=direct,source=eno1,source_mode=bridge,mac=52:54:00:55:ea:03 \ --disk /var/lib/libvirt/images/"$1" \ --os-variant=freebsd13.1 \ --graphics vnc \ --import \ --autostart 1>/dev/null 2>/dev/null & sleep 3; clear sudo touch "$pathsrv"/pfsense_ok } } function sysctl0 { [ -f "$pathsrv"/sysctl_ok ] && { clear; echo "O SYSCTL ja foi modificado. Continuando."; echo ""; sleep 2 } || { sleep 3; clear; echo "Aplicando recursos extras ao SYSCTL" echo -e "kernel.sysrq=1 vm.panic_on_oom=1 vm.swappiness=10 kernel.panic=5 #net.ipv4.ip_forward=1 #net.ipv6.conf.all.disable_ipv6=1 #net.ipv6.conf.default.disable_ipv6=1" | sudo tee -a /etc/sysctl.conf && sudo touch "$pathsrv"/sysctl_ok } } function motd0 { [ -f "$pathsrv"/motd_ok ] && { clear; echo "O MOTD ja foi substituido. Continuando."; echo ""; sleep 2 } || { sleep 3; clear; echo "Ajustando tela de boas vindas do servidor" sudo rm -R /etc/update-motd.d/* curl -sSL https://raw.githubusercontent.com/urbancompasspony/server/main/MOTD/00-header | sudo tee /etc/update-motd.d/00-header curl -sSL https://raw.githubusercontent.com/urbancompasspony/server/main/MOTD/20-sysinfo | sudo tee /etc/update-motd.d/20-sysinfo curl -sSL https://raw.githubusercontent.com/urbancompasspony/server/main/MOTD/90-dynamic-motd | sudo tee /etc/update-motd.d/90-dynamic-motd sudo chmod +x /etc/update-motd.d/* sudo touch "$pathsrv"/motd_ok } } function journal0 { [ -f "$pathsrv"/journal_ok ] && { clear; echo "O JournalCTL ja foi ajustado. Continuando."; echo ""; sleep 2 } || { sleep 3; clear; echo "Ajustando JOURNAL" echo -e " Storage=persistent SystemMaxUse=5G SystemKeepFree=10G" | sudo tee -a /etc/systemd/journald.conf && sudo touch "$pathsrv"/journal_ok } } function fstab0 { [ -f "$pathsrv"/fstab_ok ] && { clear; echo "O fstab ja foi ajustado de acordo. Continuando."; echo ""; sleep 2 } || { sudo mkdir /mnt/main sudo mkdir /mnt/backup sleep 3; clear; echo "Adicionando entradas extras ao fstab" echo -e " # Temp to ram! tmpfs /tmp tmpfs defaults 0 0 tmpfs /var/tmp tmpfs defaults 0 0 # Main Disk # /dev/disk/by-uuid/ /mnt/main ext4 defaults 0 0 # Backup # /dev/disk/by-uuid/ /mnt/backup ext4 defaults 0 0 # Acesso Externo # //172.25.0.X/folder /mnt/folder cifs credentials=/home/administrador/.smb,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,user,vers=2.1,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=3 0 0" | sudo tee -a /etc/fstab && sudo touch "$pathsrv"/fstab_ok } } function beep0 { [ -f "$pathsrv"/beep ] && { clear; echo "O beep ja foi adicionado. Continuando."; echo ""; sleep 2 } || { sleep 3; clear; echo "Criando um Beep bonitinho se tiver speaker no servidor!" wget https://raw.githubusercontent.com/urbancompasspony/linux.cheat.sheet/main/beep/beep.sh -O /home/administrador/.beep.sh clear; echo "Beep instalado. Testando..."; sudo bash /home/administrador/.beep.sh sleep 2; echo "@reboot sleep 60; bash /home/administrador/.beep.sh" | sudo tee /tmp/crontab_new sudo crontab -l | cat - /tmp/crontab_new | tee crontab.txt && sudo crontab crontab.txt sudo rm crontab.txt; sudo touch "$pathsrv"/beep } } function the_end0 { sudo touch "$pathsrv"/finished clear; echo "Instalação concluida!" echo "Reiniciando sistema..."; sleep 3 sudo reboot } function smbconf0 { clear; echo "Adicionando modelo SAMBA AD" sudo mkdir -p /srv/containers/scripts/ curl -sSL https://raw.githubusercontent.com/urbancompasspony/docker/main/SAMBA_Model/smbAD.conf | sudo tee /srv/containers/scripts/SMB-AD-Model.conf } function xpra0 { [ -f "$pathsrv"/xpra_ok ] && { clear; echo "O XPRA ja foi iniciado. Continuando."; echo ""; sleep 2 } || { sudo mkdir -p /srv/containers/xpra-virt-manager/home sudo touch /srv/containers/xpra-virt-manager/Information [ "$var2" = "" ] && { var2="$var1"; } || { echo . >/dev/null; } echo "xpra-virt-manager" | sudo tee /srv/containers/xpra-virt-manager/Information echo "$var2" | sudo tee -a /srv/containers/xpra-virt-manager/Information echo "1920x1080" | sudo tee -a /srv/containers/xpra-virt-manager/Information echo "9876" | sudo tee -a /srv/containers/xpra-virt-manager/Information echo "172.25.0.5" | sudo tee -a /srv/containers/xpra-virt-manager/Information sudo wget "$github"45-xpra-virt-manager -O /tmp/xpra-virt-manager sudo chmod +x /tmp/xpra-virt-manager sudo bash /tmp/xpra-virt-manager sudo touch "$pathsrv"/xpra_ok } } function pihole0 { [ -f "$pathsrv"/pihole_ok ] && { clear; echo "O PiHole ja foi iniciado. Continuando."; echo ""; sleep 2 } || { sudo mkdir -p /srv/containers/pihole/{etc,log,dnsmasq.d} sudo touch /srv/containers/pihole/Information [ "$var3" = "" ] && { var3="$var1"; } || { echo . >/dev/null; } echo "172.25.0.2" | sudo tee /srv/containers/pihole/Information echo "$var3" | sudo tee -a /srv/containers/pihole/Information echo "0.0.0.0" | sudo tee -a /srv/containers/pihole/Information echo "pihole" | sudo tee -a /srv/containers/pihole/Information echo "macvlan" | sudo tee -a /srv/containers/pihole/Information sudo wget "$github"01-pihole -O /tmp/pihole sudo chmod +x /tmp/pihole sudo bash /tmp/pihole sudo touch "$pathsrv"/pihole_ok } } function myspeed0 { [ -f "$pathsrv"/myspeed_ok ] && { clear; echo "O MySpeed ja foi iniciado. Continuando."; echo ""; sleep 2 } || { sudo mkdir -p /srv/containers/myspeed-tracker/data sudo touch /srv/containers/myspeed-tracker/Information echo "myspeed-tracker" | sudo tee /srv/containers/myspeed-tracker/Information echo "172.25.0.4" | sudo tee -a /srv/containers/myspeed-tracker/Information sudo wget "$github"20-myspeed-tracker -O /tmp/myspeed-tracker sudo chmod +x /tmp/myspeed-tracker sudo bash /tmp/myspeed-tracker sudo touch "$pathsrv"/myspeed_ok } } function scriptsrv0 { [ -f "$pathsrv"/scriptsrv_ok ] && { clear; echo "O ScriptSRV ja foi iniciado. Continuando."; echo ""; sleep 2 } || { sudo mkdir -p /srv/containers/script-server/{scripts,runners} sudo touch /srv/containers/script-server/Information echo "script-server" | sudo tee /srv/containers/script-server/Information echo "172.25.0.6" | sudo tee -a /srv/containers/script-server/Information sudo wget "$github"70-script-server -O /tmp/script-server sudo chmod +x /tmp/script-server sudo bash /tmp/script-server sudo touch "$pathsrv"/scriptsrv_ok } } function openspeed0 { [ -f "$pathsrv"/speed_ok ] && { clear; echo "O SpeedTestLAN ja foi iniciado. Continuando."; echo ""; sleep 2 } || { sudo mkdir -p /srv/containers/openspeedtest sudo touch /srv/containers/openspeedtest/Information echo "openspeedtest" | sudo tee /srv/containers/openspeedtest/Information echo "172.25.0.7" | sudo tee -a /srv/containers/openspeedtest/Information sudo wget "$github"16-openspeedtest -O /tmp/speedtest sudo chmod +x /tmp/speedtest sudo bash /tmp/speedtest sudo touch "$pathsrv"/speed_ok } } function menuB { var0=$(dialog --title 'Linite' --backtitle "L I N I T E" --menu " " 0 0 0 \ 1 'Linux Essentials [All]' \ 2 'RaspbberryPi & Tools [SoC Only]' \ 3 'Virtual Machines [No VM nor SoC]' \ 4 'Default Configs [All]' \ X 'Sair' 2>&1 > /dev/tty ) case "$var0" in 1) essentials0 ;; 2) raspbian0 ;; 3) VMs0 ;; 4) basicsys0 ;; X) exit ;; esac } function essentials0 { dialog --title "Menu" --yesno "Deseja instalar os seguintes pacotes? \n $list01" 25 40 [ $? = 0 ] && { sudo apt install $list01 --no-install-recommends -y && menuB } menuB } function raspbian0 { dialog --title "Menu" --yesno "Deseja instalar os seguintes pacotes? \n $list01 $package_2404" 25 40 [ $? = 0 ] && { sudo apt install $list01 $package_2404 --no-install-recommends -y && menuB } menuB } function VMs0 { dialog --title "Menu" --yesno "Deseja instalar os seguintes pacotes? \n $list00" 25 40 [ $? = 0 ] && { sudo apt install $list00 --no-install-recommends -y && sudo usermod -aG libvirt administrador; sudo usermod -aG libvirt-qemu administrador menuB } menuB } function endeavour1S { sudo pacman -S docker-buildx docker \ qemu-full qemu-base libvirt-dbus bridge-utils virt-manager ovmf dnsmasq \ filelight smb4k plasma-disks kolourpaint granatier okteta krename timeshift kget gnome-nettool \ iperf traceroute lib32-pipewire arp-scan speedtest-cli samba rsync rclone sshpass curl rclone openvpn qbittorrent nmap yt-dlp smartmontools \ p7zip cronie zip unzip dialog btrfs-progs cifs-utils inxi btop iotop cmatrix parallel rdesktop rpi-imager ciano android-tools webp-pixbuf-loader gthumb bash-language-server \ torbrowser-launcher gparted gnome-disk-utility k3b audacity thunderbird libreoffice libreoffice-fresh-pt-br thunderbird-i18n-pt-br vlc remmina kpat gimp blender obs-studio kdenlive wine \ minetest steam lib32-pipewire lib32-libpulse wacomtablet tree v4l2loopback-dkms yay -S upscayl-appimage freetube-bin anydesk-bin drawio-desktop-appimage ventoy-bin \ microsoft-edge-stable-bin google-chrome opera woeusb-ng echo -e "[General] InputMethod=qtvirtualkeyboard" | sudo tee /etc/sddm.conf.d/virtualkbd.conf sudo cp ~/.config/kwinoutputconfig.json /var/lib/sddm/.config/ sudo chown sddm:sddm /var/lib/sddm/.config/kwinoutputconfig.json sudo usermod -aG libvirt-qemu ztge; sudo usermod -aG libvirt ztge sudo usermod -aG docker ztge sudo systemctl enable --now sshd; sudo systemctl enable --now cronie; sudo systemctl enable --now docker; sudo systemctl enable --now libvirtd echo -e " //172.20.0.2/particular /mnt/particular cifs credentials=/home/ztge/.smb,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,user,vers=2.1,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=3 0 0" | sudo tee -a /etc/fstab } function containers0 { pihole0 myspeed0 xpra0 openspeed0 scriptsrv0 } # WIP function diskfun0 { UUID0=$(lsblk -o NAME,MOUNTPOINT | grep -v 'MOUNTPOINT' | awk '$2 == "" {print $1}') sudo mkfs.ext4 -FF -m 0 /dev/"$UUID0" UUID1=$(lsblk -f | grep "$UUID0" | awk '{print $4}') export UUID1 } # ======================================================================================================================================================== # function endeavour0S { endeavour1S bashconf0 mkswap0 timezone0 sysctl0 beep0 the_end0 } function basicsys0 { welcome0 "Basic v1.0" bashconf0 mkswap0 timezone0 useless0 update_basic sysctl0 the_end0 } function aarcharm0 { welcome0 "ARM v1.0" bashconf0 mkswap0 timezone0 useless0 update_arm netplan1 sysctl0 motd0 journal0 smbconf0 the_end0 } function linite0 { welcome0 "Generico v2.0" bashconf0 mkswap0 timezone0 useless0 update0 pfsense0 "pfsense.img" sysctl0 motd0 journal0 fstab0 netplan1 smbconf0 beep0 the_end0 } function appliance0 { welcome0 "Appliance v3.0" bashconf0 passmgr0 timezone0 useless0 update0 pfsense0 "pfsense-modelo.img" macvlan0 containers0 sysctl0 motd0 journal0 fstab0 smbconf0 netplan0 beep0 the_end0 } root_check0 hardsys0 exit 1