From 48c52140cf6f1cbad083f61a5ca561d9989a94d1 Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 08:14:39 +1000 Subject: [PATCH 01/16] Update apply.sh --- scripts/apply.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/apply.sh b/scripts/apply.sh index 36cceca..a6fed16 100644 --- a/scripts/apply.sh +++ b/scripts/apply.sh @@ -16,11 +16,11 @@ pve_patch echo "- Updating logon banner..." /usr/bin/pvebanner -echo "- Updating Name..." -x="Proxmox Virtual Environment" -y="Bennell IT Virtual Environment" -w="Proxmox VE" -e="Bennell IT VE " -sed -i -e "s/$x/$y/g" /usr/share/pve-manager/index.html.tpl -sed -i -e "s/$x/$y/g" /usr/share/pve-manager/touch/index.html.tpl -sed -i -e "s/$w/$e/g" /usr/share/pve-manager/js/pvemanagerlib.js +#echo "- Updating Name..." +#x="Proxmox Virtual Environment" +#y="Bennell IT Virtual Environment" +#w="Proxmox VE" +#e="Bennell IT VE " +#sed -i -e "s/$x/$y/g" /usr/share/pve-manager/index.html.tpl +#sed -i -e "s/$x/$y/g" /usr/share/pve-manager/touch/index.html.tpl +#sed -i -e "s/$w/$e/g" /usr/share/pve-manager/js/pvemanagerlib.js From f349c9094ff816ea526157c0153cf525b424ee7d Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 08:18:18 +1000 Subject: [PATCH 02/16] Update patch.sh --- patch.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patch.sh b/patch.sh index 7a1c6ee..7503c0f 100644 --- a/patch.sh +++ b/patch.sh @@ -11,6 +11,7 @@ rm -f /usr/share/pve-patch/scripts/{90pvepatch,apply.sh,pvebanner} wget -qP /usr/share/pve-patch/scripts/ https://raw.githubusercontent.com/sbennell/pve-patch/master/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 +rm -f /usr/bin/pvebanner cp -f /usr/share/pve-patch/scripts/pvebanner /usr/bin/pvebanner chmod +x /usr/share/pve-patch/scripts/apply.sh /usr/share/pve-patch/scripts/apply.sh @@ -29,7 +30,7 @@ echo "" apt update apt update && apt dist-upgrade -y echo "- Install Packages." -apt install ifupdown2 sasl2-bin mailutils libsasl2-modules -y curl +apt install ifupdown2 sasl2-bin mailutils libsasl2-modules curl -y echo "- Adding SSH Key - Bennell IT..." mkdir -p ~/.ssh From 3771fe7cfc340ce640b23d33062f69a679d412fd Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 08:41:39 +1000 Subject: [PATCH 03/16] Update patch.sh --- patch.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patch.sh b/patch.sh index 7503c0f..022f534 100644 --- a/patch.sh +++ b/patch.sh @@ -4,11 +4,11 @@ mkdir -p /usr/share/pve-patch/{images,scripts} 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/master/images/favicon.ico -wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/master/images/logo-128.png -wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/master/images/proxmox_logo.png +wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/Testing/images/favicon.ico +wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/Testing/images/logo-128.png +wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/Testing/images/proxmox_logo.png rm -f /usr/share/pve-patch/scripts/{90pvepatch,apply.sh,pvebanner} -wget -qP /usr/share/pve-patch/scripts/ https://raw.githubusercontent.com/sbennell/pve-patch/master/scripts/{90pvepatch,apply.sh,pvebanner} +wget -qP /usr/share/pve-patch/scripts/ https://raw.githubusercontent.com/sbennell/pve-patch/Testing/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 rm -f /usr/bin/pvebanner From 8f088db5d7b3e5fa4ae6118f1d475cba56b42509 Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 08:45:18 +1000 Subject: [PATCH 04/16] Update apply.sh --- scripts/apply.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/apply.sh b/scripts/apply.sh index a6fed16..b4125e7 100644 --- a/scripts/apply.sh +++ b/scripts/apply.sh @@ -13,6 +13,7 @@ function pve_patch() { } pve_patch +cp -f /usr/share/pve-patch/scripts/pvebanner /usr/bin/pvebanner echo "- Updating logon banner..." /usr/bin/pvebanner From 5a668728e2ff05af906afa3c5de836b35eb1a974 Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 08:45:30 +1000 Subject: [PATCH 05/16] Update patch.sh --- patch.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/patch.sh b/patch.sh index 022f534..51614c3 100644 --- a/patch.sh +++ b/patch.sh @@ -11,8 +11,6 @@ rm -f /usr/share/pve-patch/scripts/{90pvepatch,apply.sh,pvebanner} wget -qP /usr/share/pve-patch/scripts/ https://raw.githubusercontent.com/sbennell/pve-patch/Testing/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 -rm -f /usr/bin/pvebanner -cp -f /usr/share/pve-patch/scripts/pvebanner /usr/bin/pvebanner chmod +x /usr/share/pve-patch/scripts/apply.sh /usr/share/pve-patch/scripts/apply.sh From 9663e124f7a415a03afde34080818f708f163793 Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 09:13:50 +1000 Subject: [PATCH 06/16] Update apply.sh --- scripts/apply.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/apply.sh b/scripts/apply.sh index b4125e7..6805386 100644 --- a/scripts/apply.sh +++ b/scripts/apply.sh @@ -16,12 +16,3 @@ pve_patch cp -f /usr/share/pve-patch/scripts/pvebanner /usr/bin/pvebanner echo "- Updating logon banner..." /usr/bin/pvebanner - -#echo "- Updating Name..." -#x="Proxmox Virtual Environment" -#y="Bennell IT Virtual Environment" -#w="Proxmox VE" -#e="Bennell IT VE " -#sed -i -e "s/$x/$y/g" /usr/share/pve-manager/index.html.tpl -#sed -i -e "s/$x/$y/g" /usr/share/pve-manager/touch/index.html.tpl -#sed -i -e "s/$w/$e/g" /usr/share/pve-manager/js/pvemanagerlib.js From 400d8d2c626e51db980a4e28603e88349cfcfd3f Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 09:14:11 +1000 Subject: [PATCH 07/16] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 962ae10..7f6df16 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ Use at your own risk! Read the script before you run it. ```bash # if root -wget -qO - https://raw.githubusercontent.com/sbennell/SetupProxmox/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://raw.githubusercontent.com/sbennell/SetupProxmox/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 ``` From 992e2761de9adeaaec3e5e1682bde325cda90f6f Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 09:15:25 +1000 Subject: [PATCH 08/16] Update patch.sh --- patch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/patch.sh b/patch.sh index 51614c3..93144d4 100644 --- a/patch.sh +++ b/patch.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash mkdir -p /usr/share/pve-patch/{images,scripts} +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} From 898cf4ce204357b2fa4c60a2b21914e13976fc55 Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 09:28:31 +1000 Subject: [PATCH 09/16] Update patch.sh --- patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patch.sh b/patch.sh index 93144d4..14bffb7 100644 --- a/patch.sh +++ b/patch.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash mkdir -p /usr/share/pve-patch/{images,scripts} -echo "- Proxmox Setup Script Testing 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} From a4870ef97eda09c8ce297c620218eb1c2f9d341e Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 09:39:52 +1000 Subject: [PATCH 10/16] Update patch.sh --- patch.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/patch.sh b/patch.sh index 14bffb7..573c119 100644 --- a/patch.sh +++ b/patch.sh @@ -21,6 +21,7 @@ curl -s https://api.github.com/repos/sbennell/pve-fake-subscription/releases/lat | tr -d \" \ | wget -qi - dpkg -i pve-fake-subscription_*.deb +rm -f pve-fake-subscription_*.deb echo "127.0.0.1 shop.maurer-it.com" | sudo tee -a /etc/hosts @@ -71,5 +72,3 @@ echo "IP Address: $IP" >> /etc/postfix/emailsetupinfo.txt sendmail -v server@lab-network.xyz < /etc/postfix/emailsetupinfo.txt echo "- done!" - -echo "- done!" From f6354ad0b5a9d6899c87f56ed57b449548d94240 Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 09:44:43 +1000 Subject: [PATCH 11/16] Update pvebanner --- scripts/pvebanner | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/pvebanner b/scripts/pvebanner index add456c..41ef9bc 100644 --- a/scripts/pvebanner +++ b/scripts/pvebanner @@ -6,7 +6,7 @@ use PVE::Cluster; my $nodename = PVE::INotify::nodename(); my $localip = PVE::Cluster::remote_node_ip($nodename, 1); - +my $lastupdate = DateTime->now; my $xline = '-' x 78; my $banner = ''; @@ -29,6 +29,7 @@ $xline Please use your web browser to configure this server - connect to: https://${localip}:8006/ + Lastupdate: $lastupdate $xline __EOBANNER From ec1b87ebbcd576866af9d64468e814176689997b Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 10:29:13 +1000 Subject: [PATCH 12/16] Update pvebanner --- scripts/pvebanner | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/pvebanner b/scripts/pvebanner index 41ef9bc..bcdfb65 100644 --- a/scripts/pvebanner +++ b/scripts/pvebanner @@ -3,35 +3,35 @@ use strict; use PVE::INotify; use PVE::Cluster; +use Sys::Hostname; my $nodename = PVE::INotify::nodename(); my $localip = PVE::Cluster::remote_node_ip($nodename, 1); -my $lastupdate = DateTime->now; -my $xline = '-' x 78; +#my $lastupdate = `date +%m/%d/%Y" "%l:%M:%S" "%p`; +my $year = `date +%Y`; +my $hostname = hostname; +my $xline = '*' x 78; my $banner = ''; if ($localip) { $banner .= <<__EOBANNER; - -$xline -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 2020 -$xline - Welcome to the Bennell IT Virtual Environment. - Please use your web browser to configure this server - connect to: - - https://${localip}:8006/ - Lastupdate: $lastupdate $xline +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 + connect to https://${localip}:8006/ +$xline __EOBANNER } From 511152847ff5528509aa149b1c684dc844d2884c Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 10:33:02 +1000 Subject: [PATCH 13/16] Update patch.sh --- patch.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/patch.sh b/patch.sh index 573c119..2142fba 100644 --- a/patch.sh +++ b/patch.sh @@ -1,15 +1,17 @@ #!/usr/bin/env bash +branches=Testing + mkdir -p /usr/share/pve-patch/{images,scripts} 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/Testing/images/favicon.ico -wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/Testing/images/logo-128.png -wget -nc -qP /usr/share/pve-patch/images/ https://raw.githubusercontent.com/sbennell/pve-patch/Testing/images/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://raw.githubusercontent.com/sbennell/pve-patch/Testing/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 From 738465ed29469327526da6354fd3bee1b0bdb6da Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 10:35:09 +1000 Subject: [PATCH 14/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f6df16..0715981 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SetupProxmox -Removes subscription dialogs, replaces enterprise repository with non-subscription repository, replaces branding, Update and upgrade system, Add Benenell IT SSh Key and Configure Postfix to use Office365 SMTP Relay. Tested on PVE 5.0 to 7.0 +Removes subscription dialogs, replaces enterprise repository with non-subscription repository, replaces branding, Update and upgrade system, Add Benenell IT SSh Key and Configure Postfix to use Office365 SMTP Relay. Tested on PVE 5.0 to 7.0-11 Use at your own risk! Read the script before you run it. From 8d47dfe601606af3acf5f52000ce7f4f45024c3d Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 10:37:10 +1000 Subject: [PATCH 15/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0715981..7c121c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SetupProxmox -Removes subscription dialogs, replaces enterprise repository with non-subscription repository, replaces branding, Update and upgrade system, Add Benenell IT SSh Key and Configure Postfix to use Office365 SMTP Relay. Tested on PVE 5.0 to 7.0-11 +Removes subscription dialogs, replaces enterprise repository with non-subscription repository, apt Update and apt upgrade system, Add Benenell IT SSh Key and Configure Postfix to use Office365 SMTP Relay. Tested on PVE 5.0 to 7.0-11 Use at your own risk! Read the script before you run it. From 45b2c2f72a670e8ff33d7cb50e77e25a13bbd166 Mon Sep 17 00:00:00 2001 From: Stewart Bennell Date: Fri, 24 Sep 2021 10:43:18 +1000 Subject: [PATCH 16/16] Update patch.sh --- patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patch.sh b/patch.sh index 2142fba..f522449 100644 --- a/patch.sh +++ b/patch.sh @@ -25,7 +25,7 @@ curl -s https://api.github.com/repos/sbennell/pve-fake-subscription/releases/lat dpkg -i pve-fake-subscription_*.deb rm -f pve-fake-subscription_*.deb -echo "127.0.0.1 shop.maurer-it.com" | sudo tee -a /etc/hosts +echo "127.0.0.1 shop.maurer-it.com" | tee -a /etc/hosts echo "- Apt Update and upgrade system..." echo ""