A collection of Bash scripts designed to automate and simplify various tasks in a Proxmox environment.
- kernel_cleanup.sh: Cleans up old Proxmox kernels and updates GRUB.
- pveproxy_toggle.sh: Manages Proxmox GUI access configuration.
- shutdown_ct.sh: Stops a Proxmox Container (CT).
- shutdown_vm.sh: Unlocks and stops a Proxmox VM.
- system_update.sh: Updates and cleans the Proxmox system.
- Proxmox VE installed
- Root access to the Proxmox server
-
Clone the repository:
git clone https://github.com/ddrimus/proxmox-scripts.git cd proxmox-scripts
-
Make the scripts executable:
chmod +x *.sh
Cleans up old Proxmox kernels and updates GRUB.
sudo ./kernel_cleanup.sh
Toggles Proxmox GUI access configuration between restricted and open access.
sudo ./pveproxy_toggle.sh
The pveproxy_toggle.sh
script can be configured to restrict access to specific IP addresses. To customize the script:
-
Open the script in a text editor:
sudo nano pveproxy_toggle.sh
-
Locate the following lines near the beginning of the script:
RESTRICTION='ALLOW_FROM="127.0.0.1,192.168.1.210"' DENY_ALL='DENY_FROM="all"'
-
Modify the
ALLOW_FROM
value to include the IP addresses you want to allow access from. For example:RESTRICTION='ALLOW_FROM="127.0.0.1,192.168.1.210,10.0.0.50"'
-
Save the changes and exit the text editor.
The script will now toggle between allowing access only from the specified IP addresses and allowing access from everywhere.
Stops a specified Proxmox Container (CT).
sudo ./shutdown_ct.sh <CT_ID>
Unlocks and stops a specified Proxmox VM.
sudo ./shutdown_vm.sh <VM_ID>
Updates and cleans the Proxmox system.
sudo ./system_update.sh
Contributions are welcome! If you have ideas for improvements or new scripts, feel free to submit a pull request.
- Inspired by the need for automated management tasks in Proxmox environments.
- Thanks to the Proxmox community for their valuable insights and feedback.