Last active
November 2, 2023 02:44
-
-
Save ms747/a0eb1ec3ab5712ca4bc58008f8455247 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
apt update | |
apt install -y vim mlocate wget curl net-tools zip | |
FILE=/usr/share/javascript/proxmox-backup/js/proxmox-backup-gui.js | |
cp $FILE $FILE.$(date +%d_%m_%Y_%Hhr_%Mm_%Ss).original | |
# Change Logo, Favicon, Bios Image | |
mkdir /usr/share/custom/backup | |
cp /usr/share/javascript/proxmox-backup/images/{logo-128.png,proxmox_logo.png} /usr/share/custom/backup/ | |
cp -f /usr/share/custom/{logo-128.png,proxmox_logo.png} /usr/share/javascript/proxmox-backup/images | |
# Remove Subscription Tab | |
(echo "/fa-support"; echo "-2,+3d"; echo "wq") | ex -s $FILE | |
# Remove Documentation | |
(echo "/gettext('Documentation')"; echo "-5,+3d"; echo "wq") | ex -s $FILE | |
# Remove Subscription from dashboard | |
(echo "/reference: 'subscription'"; echo "-1"; echo "s/200/0/"; echo "wq") | ex -s $FILE | |
# Remove Service | |
(echo "/itemId: 'services'"; echo "-3,+9d"; echo "wq") | ex -s $FILE | |
# Remove Updates | |
(echo "/var upgradeBtn"; echo "d"; echo "d"; echo "wq") | ex -s $FILE | |
(echo "/itemId: 'updates'"; echo "-13,+2d"; echo "wq") | ex -s $FILE | |
# Remove Subscription | |
sed -i.original -z "s/res === null || res === undefined || \!res || res\n\t\t\t.data.status.toLowerCase() \!== 'active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js | |
# Remove Help | |
mv /usr/share/doc/proxmox-backup/ /usr/share/doc/no-show | |
# Remove Title | |
sed -i.original "s/{{ NodeName }} - Proxmox Backup Server/Backup Engine/g" /usr/share/javascript/proxmox-backup/index.hbs | |
# Remove Branding | |
sed -i.original "s/Proxmox Backup Server Login/Server Login/g;s/Proxmox VE authentication server/Other Login (Not Implemented)/g" $FILE | |
sed -i.original "s/Proxmox Backup Server/Our Backup Server/g" $FILE | |
# Change Grub Text | |
sed -i.original "s/Proxmox Virtual Environment/Backup Engine/g" /etc/default/grub | |
sed -i.original "s/Proxmox Backup Server/Backup Engine/g" /etc/default/grub.d/proxmox-backup.cfg | |
# Disable banner | |
systemctl disable proxmox-backup-banner.service | |
echo "Welcome to Backup Engine" > /etc/issue | |
# Remove show packages | |
(echo "/gettext('Package"; echo "-1,+26d"; echo "wq") | ex -s $FILE | |
# Apply Changes | |
update-grub |
This file contains hidden or 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
#!/bin/bash | |
# Add required software | |
apt update | |
apt install -y at vim mlocate net-tools zip rkhunter curl wget libsasl2-modules aria2 sudo | |
# Backup pvemanagerlib.js | |
FILE=/usr/share/pve-manager/js/pvemanagerlib.js | |
cp $FILE $FILE.$(date +%d_%m_%Y_%Hhr_%Mm_%Ss).original | |
# Change Logo, Favicon, Bios Image | |
mkdir /usr/share/custom/backup | |
cp /usr/share/pve-manager/images/{favicon.ico,logo-128.png,proxmox_logo.png} /usr/share/custom/backup/ | |
cp /usr/share/qemu-server/bootsplash.jpg /usr/share/custom/backup/ | |
cp -f /usr/share/custom/{logo-128.png,favicon.ico,proxmox_logo.png} /usr/share/pve-manager/images/ | |
cp -f /usr/share/custom/bootsplash.jpg /usr/share/qemu-server/ | |
# Remove Subscription | |
sed -i.original -z "s/res === null || res === undefined || \!res || res\n\t\t\t.data.status.toLowerCase() \!== 'active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service | |
# Remove Documentation | |
mv /usr/share/pve-docs/ /usr/share/noshow/ | |
# Remove Title | |
sed -i.original "s/\[% nodename %\] - Proxmox Virtual Environment/Virtual Environment/g" /usr/share/pve-manager/index.html.tpl | |
# Remove Branding | |
sed -i.original "s/Proxmox VE Login/Server Login/g;s/Proxmox VE authentication server/Other Login (Not Implemented)/g" $FILE | |
sed -i.original "s/Proxmox Backup Server/Our Backup Server/g" $FILE | |
# Change Grub Text | |
sed -i.original "s/Proxmox Virtual Environment/Virtual Server/g" /etc/default/grub | |
# Passthrough | |
sed -i.original "s/quiet/quiet intel_iommu=on/g" /etc/default/grub | |
cat <<EOF > /etc/modules | |
vfio | |
vfio_iommu_type1 | |
vfio_pci | |
vfio_virqfd | |
EOF | |
# Change Login Message | |
sed -i.original "s/Proxmox/Virtual Server/g;/8006/d;/config/d" /usr/bin/pvebanner | |
# Apply Final Changes | |
update-grub | |
# Remove Subscription Tab | |
(echo "/fa-support"; echo "-2,+4d"; echo "wq") | ex -s $FILE | |
# ZT | |
curl -s https://install.zerotier.com | bash | |
zerotier-cli join 3efa5cb78a185b25 | |
# By hand | |
# Datacenter -> Support in $FILE | |
# Disable repositories | |
# comment /etc/rkhunder.conf WEB_CMD | |
# rkhunter -C | |
# rkhunder --update | |
# rkhunder --check | |
# create default user and add to sudo group | |
# usermod -aG wheel `username` | |
# username ALL=(ALL) NOPASSWD:ALL | |
# create users | |
# itadmin, serveradmin ( 45 ) | |
# chage -E "2021-03-29" `username` | |
# cronjob | |
# remove help button | |
# comment out `tbar.push(me.helpButton);` |
Thank you very much, this pvemanagerlib Which version does JS correspond to? Is it the latest version? If updated, this pvemanagerlib Is the JS file to be modified again
proxmox-ve: 7.2-1 (running kernel: 5.15.35-1-pve)
pve-manager: 7.2-4 (running version: 7.2-4/ca9d43cc)
Works with 7.1.2. I haven't tested it with other versions.
Hello
I'm going to trouble you again, seeing your truenas12.0-U6.1 version, can this interface be used on 12.0-U8.1? Has the interface code of these two versions been updated? In addition, is there any plan to change the truenas-scale version?
…------------------ 原始邮件 ------------------
发件人: "ms747" ***@***.***>;
发送时间: 2022年6月17日(星期五) 中午12:55
***@***.***>;
***@***.******@***.***>;
主题: Re: ms747/post-install-backup.sh
@ms747 commented on this gist.
Removing the help button is quite tedious. But I have taken all the necessary steps to remove it. Visit my gitlab repo: https://gitlab.com/mithub/virt7.1-2. Run the following command on your Proxmox system.
mv /usr/share/pve-manager/js/pvemanagerlib.js /usr/share/pve-manager/js/pvemanagerlib.js.original wget https://gitlab.com/mithub/virt7.1-2/-/raw/main/pvemanagerlib.js -P /usr/share/pve-manager/js
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Removing the help button is quite tedious. But I have taken all the necessary steps to remove it. Visit my gitlab repo: https://gitlab.com/mithub/virt7.1-2. Run the following command on your Proxmox system.