Add update_apt_proxy_all.sh script with interactive proxy configuration for LXC containers and VMs
This commit is contained in:
54
README.md
Normal file
54
README.md
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Proxmox Scripts
|
||||||
|
|
||||||
|
A professional collection of automation and management scripts for Proxmox environments, including LXC containers, VMs, and node configuration.
|
||||||
|
|
||||||
|
## Repository Structure
|
||||||
|
|
||||||
|
- `scripts/` — All automation and management scripts for Proxmox.
|
||||||
|
- `misc/` — Miscellaneous scripts, including `update_apt_proxy_all.sh`.
|
||||||
|
- `docs/` — Documentation and usage guides for each script.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Clone the repository:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.lewsion.com/endrence/proxmox-scripts.git
|
||||||
|
cd proxmox-scripts
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Place your scripts in the `scripts/` directory. Each script should be documented in the `docs/` folder or within the script itself.
|
||||||
|
|
||||||
|
### Example: update_apt_proxy_all.sh
|
||||||
|
|
||||||
|
Automates apt-cacher-ng proxy configuration for all LXC containers, VMs (with QEMU Guest Agent), and optionally the Proxmox node itself.
|
||||||
|
|
||||||
|
Run locally:
|
||||||
|
```bash
|
||||||
|
bash scripts/misc/update_apt_proxy_all.sh
|
||||||
|
```
|
||||||
|
Or run directly from the raw link:
|
||||||
|
```bash
|
||||||
|
bash <(curl -s https://git.lewsion.com/endrence/proxmox-scripts/raw/branch/main/scripts/misc/update_apt_proxy_all.sh)
|
||||||
|
```
|
||||||
|
|
||||||
|
See `docs/update_apt_proxy_all.md` for full documentation.
|
||||||
|
|
||||||
|
## Adding New Scripts
|
||||||
|
|
||||||
|
- Add new scripts to the `scripts/` directory (organize in subfolders as needed).
|
||||||
|
- Document each script in the `docs/` folder or within the script file.
|
||||||
|
- Update this README with a brief description of new scripts.
|
||||||
|
|
||||||
|
## Contribution
|
||||||
|
|
||||||
|
Contributions are welcome! Please:
|
||||||
|
- Follow the existing folder structure and documentation style.
|
||||||
|
- Document your scripts for easier usage and maintenance.
|
||||||
|
- Submit pull requests with clear descriptions of changes.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
35
scripts/misc/update_apt_proxy_all.md
Normal file
35
scripts/misc/update_apt_proxy_all.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# update_apt_proxy_all.sh
|
||||||
|
|
||||||
|
This script automates the configuration of the apt-cacher-ng proxy for all Proxmox LXC containers, VMs (with QEMU Guest Agent), and optionally the Proxmox node itself.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Interactive prompts for proxy IP, port, and target selection (LXC, VM, All, Node).
|
||||||
|
- Updates `/etc/apt/apt.conf.d/01proxy` in selected targets.
|
||||||
|
- Works with both LXC containers and VMs (requires QEMU Guest Agent for VMs).
|
||||||
|
- Optionally updates the Proxmox node itself.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
You can run the script directly if it’s cloned locally:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash scripts/misc/update_apt_proxy_all.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Or, run it directly from the raw link (no need to clone):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash <(curl -s https://git.lewsion.com/endrence/proxmox-scripts/raw/branch/main/scripts/misc/update_apt_proxy_all.sh)
|
||||||
|
```
|
||||||
|
|
||||||
|
Follow the prompts to select targets and configure the proxy.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Proxmox environment with `pct` and `qm` commands available.
|
||||||
|
- QEMU Guest Agent installed in VMs for VM updates.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
Reference in New Issue
Block a user