Skip to content

Instantly share code, notes, and snippets.

@RobSeder
RobSeder / remove-proxmox-web-banner.sh
Last active April 29, 2024 03:33
In ProxMox, when you change your APT repo from enterprise.proxmox.com pve-enterprise to download.proxmox.com pve-no-subscription, the UI shows a "warning" message about not using the enterprise version. This removes that popup.
#!/bin/bash
# Set color codes
INFO='\033[1;36m' # Cyan
SUCCESS='\033[1;32m' # Green
ERROR='\033[1;31m' # Red
NC='\033[0m' # No Color
echo -e "${INFO}[*] Changing directory to /usr/share/javascript/proxmox-widget-toolkit/${NC}"
cd /usr/share/javascript/proxmox-widget-toolkit/ || { echo -e "${ERROR}[-] Error: Failed to change directory${NC}"; exit 1; }
@RobSeder
RobSeder / revert.sh
Created March 2, 2024 05:58
Revert ProxMox from orphaned cluster node, back to standalone server.
systemctl stop pve-cluster
systemctl stop corosync
#Start the cluster file system again in local mode:
pmxcfs -l
#Delete the corosync configuration files:
rm /etc/pve/corosync.conf
@RobSeder
RobSeder / fix-prompts.sh
Created June 7, 2023 15:33
Change the non-privileged user prompt to show the FQDN. Copy that in place for root, and make roots prompt red instead of green.
#!/bin/bash
echo "[*] Show the full hostname in the prompt unprivileged prompt."
sed -i 's/\\h/$(hostname -f)/g' ~/.bashrc
source ~/.bashrc
echo "[*] Copy this file to /root/"
sudo cp ~/.bashrc /root/
echo "[*] Change the root prompt to be red."
@RobSeder
RobSeder / update.sh
Last active March 16, 2022 09:59
Default update scripts for Debian-based Linux distributions. See this blog post: http://blog.robseder.com/?p=13292
#!/bin/bash
Black='\033[0;30m'
DarkGray='\033[1;30m'
Red='\033[0;31m'
LightRed='\033[1;31m'
Green='\033[0;32m'
LightGreen='\033[1;32m'
Brown='\033[0;33m'
Yellow='\033[1;33m'