# vmbr0 => public
# vmbr1 => private => mtu 8996
# disable PVE enterprise repo
# enable PVE no-subscription
# enable debian non-free repo
apt update && apt -y full-upgrade && apt -y install intel-microcode
apt -y install openvswitch-switch tmux htop curl wget jq rsync rclone mtr-tiny net-tools iperf3
# Enable auto update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Require curl & jq | |
hash curl 2>/dev/null || { echo >&2 "I require 'curl' but it's not installed. Aborting."; exit 1; } | |
hash jq 2>/dev/null || { echo >&2 "I require 'jq' but it's not installed. Aborting."; exit 1; } | |
# Get domain list | |
read -e -i 'domains.csv' -p 'Domain list file: ' DOMAIN_FILE | |
read -e -i 'y' -p 'CF Proxy [Y/n]: ' CF_PROXY | |
if [[ ${CF_PROXY} =~ ^([yY][eE][sS]|[yY])+$ ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Require curl & jq | |
hash curl 2>/dev/null || { echo >&2 "I require 'curl' but it's not installed. Aborting."; exit 1; } | |
hash jq 2>/dev/null || { echo >&2 "I require 'jq' but it's not installed. Aborting."; exit 1; } | |
# Get user infos | |
read -e -i 'http://domain.com:2222' -p 'DA URL: ' DA_URL | |
read -p 'DA User: ' DA_USER | |
read -sp 'DA Password: ' DA_PASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$(whoami)" != "root" ]; then | |
SUDO=sudo | |
fi | |
if ! $(type lsb_release > /dev/null 2>&1) ; then | |
${SUDO} apt install -y lsb-release | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo rm -f ~/.rnd | |
if grep -qs "CentOS release 5" "/etc/redhat-release"; then | |
echo "CentOS 5 is too old and not supported" | |
exit | |
fi | |
if ! hash openssl 2>/dev/null; then\ | |
echo "Required openssl" | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#============================================================================== | |
# title: docker-nginx-http3.sh | |
# description: build nginx http3 support from https://github.com/patrikjuvonen/docker-nginx-http3 | |
# author: Kawin Viriyaprasopsook <kawin.v@kkumail.com> | |
# usage: bash docker-nginx-http3.sh | |
# notes: need `docker curl git` packages | |
#============================================================================== | |
git clone https://github.com/patrikjuvonen/docker-nginx-http3.git tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
wget -O /usr/local/directadmin/scripts/getDA.sh https://gist.github.com/bouroo/6ffbb5afe99acdf975d0664f2e6970f6/raw/a7028ed7fb57da830b0e5d7b2678cc18527d0cf0/getDA.sh && \ | |
/usr/local/directadmin/scripts/getDA.sh stable && \ | |
sleep 5 && \ | |
/usr/local/directadmin/directadmin set update_channel stable && \ | |
/usr/local/directadmin/directadmin config-set autoupdate 1 && \ | |
/usr/local/directadmin/scripts/getLicense.sh auto && \ | |
service directadmin restart | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Define variable | |
KEA_VER="v1_8_0" | |
CPU_CORES=$(grep -c processor /proc/cpuinfo) | |
if [ ${CPU_CORES} -gt 1 ]; then | |
CPU_CORES=$((CPU_CORES - 1)) | |
fi | |
if [ "$(whoami)" != "root" ]; then | |
SUDO=sudo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Script: install_go.sh | |
# | |
# Description: | |
# This script automates the installation of the Go programming language for various architectures | |
# and major operating systems. It detects the system architecture and OS to download the | |
# appropriate Go binary and sets up the necessary environment variables. | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# find root path | |
ROOT_DEV=$(findmnt -n -o SOURCE /) | |
# rescan disk size | |
echo 1 | sudo tee /sys/block/sda/device/rescan | |
# grow partition that contains root | |
# extend partition size | |
growpart /dev/sda 3 | |
# extend physical volume | |
pvresize /dev/sda3 |