#!/bin/bash # DATABASE # using 2 interfaces # out {DHCP} only for install and update # in {db} static # Ask for $db_user $internla_ip $StrongPswd apt update -y apt upgrade -y apt install mariadb-server systemctl start mariadb systemctl enable mariadb mariadb-secure-installation mysql -u root -p CREATE DATABASE playersync; CREATE USER $db_user@$internal_ip IDENTIFIED BY $StrongPswd; GRANT ALL ON playersync.* TO $db_user@$internal_ip WITH GRANT OPTION; FLUSH PRIVILEGES; EXIT; # SERVER # using 3 interfaces # out {DHCP} only for install and update # in {db} static # tailscale tunel to velocity {must edit conf file} # echo lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file > /etc/pve/lxc/$server_id.conf