Compare commits

..

No commits in common. "master" and "Testing" have entirely different histories.

4 changed files with 46 additions and 51 deletions

View File

@ -12,10 +12,10 @@ Use at your own risk! Read the script before you run it.
```bash
# if root
wget -qO - https://gitea.shillam.me.uk/mshillam/SetupProxmox/raw/branch/master/patch.sh -c -O patch.sh && bash patch.sh && rm patch.sh
wget -qO - https://raw.githubusercontent.com/sbennell/SetupProxmox/Testing/patch.sh -c -O patch.sh && bash patch.sh && rm patch.sh
# if non-root
wget -qO - https://gitea.shillam.me.uk/mshillam/SetupProxmox/raw/branch/master/patch.sh -c -O patch.sh && sudo bash patch.sh && rm patch.sh
wget -qO - https://raw.githubusercontent.com/sbennell/SetupProxmox/Testing/patch.sh -c -O patch.sh && sudo bash patch.sh && rm patch.sh
```

View File

@ -1,17 +1,17 @@
#!/usr/bin/env bash
branches=master
branches=Testing
mkdir -p /usr/share/pve-patch/{images,scripts}
echo "- Proxmox Setup Script $branches Version..."
echo "- Proxmox Setup Script Testing Version..."
echo "- patch `pveversion`..."
echo "- download and copy files..."
#rm -f /usr/share/pve-patch/images/{favicon.ico,logo-128.png,proxmox_logo.png}
#wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/$branches/images/favicon.ico
#wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/$branches/images/logo-128.png
#wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/$branches/images/proxmox_logo.png
rm -f /usr/share/pve-patch/images/{favicon.ico,logo-128.png,proxmox_logo.png}
wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/$branches/images/favicon.ico
wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/$branches/images/logo-128.png
wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/$branches/images/proxmox_logo.png
rm -f /usr/share/pve-patch/scripts/{90pvepatch,apply.sh,pvebanner}
wget -qP /usr/share/pve-patch/scripts/ https://gitea.shillam.me.uk/mshillam/SetupProxmox/raw/branch/$branches/scripts/{90pvepatch,apply.sh,pvebanner}
wget -qP /usr/share/pve-patch/scripts/ https://raw.githubusercontent.com/sbennell/pve-patch/$branches/scripts/{90pvepatch,apply.sh,pvebanner}
chmod -R a+x /usr/share/pve-patch/scripts
cp -f /usr/share/pve-patch/scripts/90pvepatch /etc/apt/apt.conf.d/90pvepatch
chmod +x /usr/share/pve-patch/scripts/apply.sh
@ -29,47 +29,48 @@ echo "127.0.0.1 shop.maurer-it.com" | tee -a /etc/hosts
echo "- Apt Update and upgrade system..."
echo ""
apt update
apt update && apt dist-upgrade -y
echo "- Install Packages."
apt install ifupdown2 sasl2-bin mailutils libsasl2-modules curl -y
echo "- Adding SSH Key - Matthew Shillam..."
echo "- Adding SSH Key - Bennell IT..."
mkdir -p ~/.ssh
touch ~/.ssh/authorized_keys
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcFjKOC+TWLurU/q/JQUbMP0AfNaUTWWXe2zy8BDs2v matthew@shillam.me.uk >> ~/.ssh/authorized_keys
echo ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAkXk0+tC1ZMiWgTQvE/GeB9+TuPWTf8mr9zVOYdNhF+KFXxc/DjMjIPNCAUxtQErlush1GF87b7gaEIC2F5p/+xr39gnt5panjT2AJmVQm9GrSc0LwZOHducgB9SeW7F6A2hA0dtEDxOPHC88ipT9qvTZdeC+mgoNmyIAIMmnPVcZOqQm7iVUf3kJCRWVGI/csE1UYpZ1tLpkaNqjP0Iy7cQvNgodJWh8Mg//TD6ESKBQ35P3+6zT2zEpIK/hQ5eaW5Uu82kSt1ZGuNaPukfCra0cjWr2n4hC+C3E9m3K/3ZV43usaxwSbPa6R/jJE4fyqpC2hqdTKW8Z66mVTC8EpQ== Bennell IT >> ~/.ssh/authorized_keys
chmod -R go= ~/.ssh
#echo "- Setting up smtp for email alerts"
echo "- Setting up smtp for email alerts"
#remove file if exists
#rm -f /etc/postfix/{main.cf,emailsetupinfo.txt,sasl_passwd,sender_canonical}
rm -f /etc/postfix/{main.cf,emailsetupinfo.txt,sasl_passwd,sender_canonical}
#Downloading Files
#wget -nc -qP /etc/postfix/ https://raw.githubusercontent.com/sbennell/pve-patch/master/mail/main.cf
wget -nc -qP /etc/postfix/ https://raw.githubusercontent.com/sbennell/pve-patch/master/mail/main.cf
#echo "Enter Office 365 Email Address?"
#read Email
echo "Enter Office 365 Email Address?"
read Email
#echo "Enter Office 365 Email Password?"
#read Password
echo "Enter Office 365 Email Password?"
read Password
#echo "[smtp.office365.com]:587 $Email:$Password" >> /etc/postfix/sasl_passwd
#echo "/.+/ $Email" >> /etc/postfix/sender_canonical
echo "[smtp.office365.com]:587 $Email:$Password" >> /etc/postfix/sasl_passwd
echo "/.+/ $Email" >> /etc/postfix/sender_canonical
#postmap hash:/etc/postfix/sasl_passwd
#postmap hash:/etc/postfix/sender_canonical
#chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
#chmod 644 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
#chown root:root /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
#chmod 644 /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
#service postfix restart
postmap hash:/etc/postfix/sasl_passwd
postmap hash:/etc/postfix/sender_canonical
chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
chmod 644 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
chown root:root /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
chmod 644 /etc/postfix/sender_canonical /etc/postfix/sender_canonical.db
service postfix restart
#Serverfqdn=$(hostname -f)
#IP=$(hostname -I)
Serverfqdn=$(hostname -f)
IP=$(hostname -I)
#echo "to: server@bennellit.com.au" >> /etc/postfix/emailsetupinfo.txt
#echo "subject:New Server Setup Info $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
#echo "Hostname: $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
#echo "IP Address: $IP" >> /etc/postfix/emailsetupinfo.txt
echo "to: server@bennellit.com.au" >> /etc/postfix/emailsetupinfo.txt
echo "subject:New Server Setup Info $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
echo "Hostname: $Serverfqdn" >> /etc/postfix/emailsetupinfo.txt
echo "IP Address: $IP" >> /etc/postfix/emailsetupinfo.txt
#sendmail -v server@lab-network.xyz < /etc/postfix/emailsetupinfo.txt
sendmail -v server@lab-network.xyz < /etc/postfix/emailsetupinfo.txt
echo "- done!"

View File

@ -9,12 +9,10 @@ function pve_patch() {
echo "- apply patch..."
echo $FREE_REPO_LINE > $FREE_REPO_LIST
[ -f $ENTERPRISE_REPO_LIST ] && mv $ENTERPRISE_REPO_LIST $ENTERPRISE_REPO_LIST~
#cp --backup /usr/share/pve-patch/images/* /usr/share/pve-manager/images/
cp --backup /usr/share/pve-patch/images/* /usr/share/pve-manager/images/
}
pve_patch
cp -f /usr/share/pve-patch/scripts/pvebanner /usr/bin/pvebanner
echo "- Updating logon banner..."
/usr/bin/pvebanner
bash <(curl -s https://raw.githubusercontent.com/Weilbyte/PVEDiscordDark/master/PVEDiscordDark.sh ) install

View File

@ -18,19 +18,15 @@ if ($localip) {
$banner .= <<__EOBANNER;
$xline
@@@ @@@ @@@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@ @@@@@@ @@@@@@@@
@@@@ @@@ @@@@@@@@ @@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@
@@!@!@@@ @@! @@! @@! @@@ @@! @@@ @@! @@@ @@! @@@ @@!
!@!!@!@! !@! !@! !@! @!@ !@! @!@ !@! @!@ !@! @!@ !@!
@!@ !!@! @!!!:! @!! @!@@!@! @!@!!@! @!@ !@! @!@ !@! @!!!:!
!@! !!! !!!!!: !!! !!@!!! !!@!@! !@! !!! !@! !!! !!!!!:
!!: !!! !!: !!: !!: !!: :!! !!: !!! !!: !!! !!:
:!: !:! :!: :!: :!: :!: !:! :!: !:! :!: !:! :!:
:: :: :: :::: :: :: :: ::: ::::: :: ::::: :: ::
:: : : :: :: : : : : : : : : : : : :
netproof.co.uk $year
888888b. 888 888 8888888 88888888888
888 "88b 888 888 888 888
888 .88P 888 888 888 888
8888888K. .d88b. 88888b. 88888b. .d88b. 888 888 888 888
888 "Y88b d8P Y8b 888 "88b 888 "88b d8P Y8b 888 888 888 888
888 888 88888888 888 888 888 888 88888888 888 888 888 888
888 d88P Y8b. 888 888 888 888 Y8b. 888 888 888 888
8888888P" "Y8888 888 888 888 888 "Y8888 888 888 8888888 888
www.bennellit.com.au $year
$xline
Welcome to $hostname Server.
Please use your web browser to configure this server
@ -40,7 +36,7 @@ __EOBANNER
}
open(ISSUE, ">/etc/motd");
open(ISSUE, ">/etc/issue");
print ISSUE $banner;