Compare commits

...

14 Commits

Author SHA1 Message Date
mshillam 360146a4c9 Comment out image stuff 2022-02-19 22:46:03 +00:00
mshillam ed868b2a4f Change /etc/issue to /etc/motd 2022-02-19 22:44:46 +00:00
mshillam af8aef66ff Change URL 2022-02-19 22:10:50 +00:00
mshillam 387619d222 Change MOTD LOGO 2022-02-19 22:07:58 +00:00
mshillam 774f239b51 Change URL 2022-02-19 22:06:16 +00:00
mshillam 4c024ef798 Add SSH Key 2022-02-19 22:05:08 +00:00
mshillam a1500a80b7 Update URL for scripts 2022-02-19 21:53:23 +00:00
mshillam 6b28e4efdd Alter settings, Comment out Email 2022-02-19 21:49:22 +00:00
Stewart Bennell 48c5efd604
Update patch.sh 2022-01-13 08:54:32 +11:00
Stewart Bennell 11b455f342
add Dark Mode 2022-01-13 08:53:44 +11:00
Stewart Bennell e043734614
Update patch.sh
Remove apt update ad it is their twice
2021-10-15 19:39:42 +11:00
Stewart Bennell 50cee86a74
Update patch.sh 2021-09-24 10:46:01 +10:00
Stewart Bennell ff60c2db32
Update README.md 2021-09-24 10:45:48 +10:00
Stewart Bennell 5ff5b7c228
Merge pull request #2 from sbennell/Testing 2021-09-24 10:45:20 +10:00
4 changed files with 51 additions and 46 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://raw.githubusercontent.com/sbennell/SetupProxmox/Testing/patch.sh -c -O patch.sh && bash patch.sh && rm patch.sh
wget -qO - https://gitea.shillam.me.uk/mshillam/SetupProxmox/raw/branch/master/patch.sh -c -O patch.sh && bash patch.sh && rm patch.sh
# if non-root
wget -qO - https://raw.githubusercontent.com/sbennell/SetupProxmox/Testing/patch.sh -c -O patch.sh && sudo bash patch.sh && rm patch.sh
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
```

View File

@ -1,17 +1,17 @@
#!/usr/bin/env bash
branches=Testing
branches=master
mkdir -p /usr/share/pve-patch/{images,scripts}
echo "- Proxmox Setup Script Testing Version..."
echo "- Proxmox Setup Script $branches 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://raw.githubusercontent.com/sbennell/pve-patch/$branches/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}
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,48 +29,47 @@ 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 - Bennell IT..."
echo "- Adding SSH Key - Matthew Shillam..."
mkdir -p ~/.ssh
touch ~/.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
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEcFjKOC+TWLurU/q/JQUbMP0AfNaUTWWXe2zy8BDs2v matthew@shillam.me.uk >> ~/.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,10 +9,12 @@ 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,15 +18,19 @@ 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 $year
@@@ @@@ @@@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@ @@@@@@ @@@@@@@@
@@@@ @@@ @@@@@@@@ @@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@
@@!@!@@@ @@! @@! @@! @@@ @@! @@@ @@! @@@ @@! @@@ @@!
!@!!@!@! !@! !@! !@! @!@ !@! @!@ !@! @!@ !@! @!@ !@!
@!@ !!@! @!!!:! @!! @!@@!@! @!@!!@! @!@ !@! @!@ !@! @!!!:!
!@! !!! !!!!!: !!! !!@!!! !!@!@! !@! !!! !@! !!! !!!!!:
!!: !!! !!: !!: !!: !!: :!! !!: !!! !!: !!! !!:
:!: !:! :!: :!: :!: :!: !:! :!: !:! :!: !:! :!:
:: :: :: :::: :: :: :: ::: ::::: :: ::::: :: ::
:: : : :: :: : : : : : : : : : : : :
netproof.co.uk $year
$xline
Welcome to $hostname Server.
Please use your web browser to configure this server
@ -36,7 +40,7 @@ __EOBANNER
}
open(ISSUE, ">/etc/issue");
open(ISSUE, ">/etc/motd");
print ISSUE $banner;