Merge pull request #2 from sbennell/Testing
This commit is contained in:
commit
5ff5b7c228
|
|
@ -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, 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.
|
||||
|
|
@ -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
|
||||
|
||||
```
|
||||
|
||||
|
|
|
|||
19
patch.sh
19
patch.sh
|
|
@ -1,17 +1,19 @@
|
|||
#!/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/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/$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/master/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
|
||||
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
|
||||
|
||||
|
|
@ -21,15 +23,16 @@ 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
|
||||
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 -y curl
|
||||
apt install ifupdown2 sasl2-bin mailutils libsasl2-modules curl -y
|
||||
|
||||
echo "- Adding SSH Key - Bennell IT..."
|
||||
mkdir -p ~/.ssh
|
||||
|
|
@ -71,5 +74,3 @@ echo "IP Address: $IP" >> /etc/postfix/emailsetupinfo.txt
|
|||
sendmail -v server@lab-network.xyz < /etc/postfix/emailsetupinfo.txt
|
||||
|
||||
echo "- done!"
|
||||
|
||||
echo "- done!"
|
||||
|
|
|
|||
|
|
@ -13,14 +13,6 @@ function pve_patch() {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -3,34 +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 $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/
|
||||
$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
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue