mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Compare commits
	
		
			120 Commits
		
	
	
		
			2025-08-02
			...
			2025-08-08
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					030a977209 | ||
| 
						 | 
					b8176dc7b3 | ||
| 
						 | 
					cd0625cba6 | ||
| 
						 | 
					73e131ecf8 | ||
| 
						 | 
					a0d6082b95 | ||
| 
						 | 
					70ccaf6835 | ||
| 
						 | 
					05b58decc2 | ||
| 
						 | 
					ff1b7cc81d | ||
| 
						 | 
					a2bbc2174a | ||
| 
						 | 
					a8a44a4d51 | ||
| 
						 | 
					ed620e8258 | ||
| 
						 | 
					1fc667088c | ||
| 
						 | 
					d89055a5cd | ||
| 
						 | 
					4ecd019e15 | ||
| 
						 | 
					e3a31aa47e | ||
| 
						 | 
					ed936528d2 | ||
| 
						 | 
					6f24de7d63 | ||
| 
						 | 
					54de40ed53 | ||
| 
						 | 
					872cd289ff | ||
| 
						 | 
					9c37ac385c | ||
| 
						 | 
					575ad61c93 | ||
| 
						 | 
					1773cc5507 | ||
| 
						 | 
					11b19fdeab | ||
| 
						 | 
					5e6081fbea | ||
| 
						 | 
					e2a310dd3a | ||
| 
						 | 
					d934d1b51b | ||
| 
						 | 
					6e3c08142d | ||
| 
						 | 
					a41497f90a | ||
| 
						 | 
					c54025f8de | ||
| 
						 | 
					a1eb53841d | ||
| 
						 | 
					6c4c3ffa39 | ||
| 
						 | 
					78f695f397 | ||
| 
						 | 
					4b0d24ed2e | ||
| 
						 | 
					705d66e7c6 | ||
| 
						 | 
					c4703527dc | ||
| 
						 | 
					9b607c60b4 | ||
| 
						 | 
					4717852019 | ||
| 
						 | 
					ab9c57ccf9 | ||
| 
						 | 
					dce77d12c7 | ||
| 
						 | 
					1f35b649cc | ||
| 
						 | 
					5938a9aceb | ||
| 
						 | 
					3b76211c12 | ||
| 
						 | 
					7221a0759d | ||
| 
						 | 
					a750932b3a | ||
| 
						 | 
					a4de1efae8 | ||
| 
						 | 
					f7570cb40c | ||
| 
						 | 
					10471b88aa | ||
| 
						 | 
					04a83cce10 | ||
| 
						 | 
					f9e26f4f7c | ||
| 
						 | 
					ed6baa1158 | ||
| 
						 | 
					a7cc93af09 | ||
| 
						 | 
					a494ed5872 | ||
| 
						 | 
					ede517a560 | ||
| 
						 | 
					bd41b236df | ||
| 
						 | 
					229c7ce4b3 | ||
| 
						 | 
					cc8381d7f7 | ||
| 
						 | 
					dc5b9be9ae | ||
| 
						 | 
					993aff59d7 | ||
| 
						 | 
					f3844c664c | ||
| 
						 | 
					47b3f71992 | ||
| 
						 | 
					09c815e935 | ||
| 
						 | 
					f59d4960f1 | ||
| 
						 | 
					c53d1d004a | ||
| 
						 | 
					bbdda06297 | ||
| 
						 | 
					daab80aaf4 | ||
| 
						 | 
					9250f9fae9 | ||
| 
						 | 
					6fa371fffc | ||
| 
						 | 
					e85263078e | ||
| 
						 | 
					f9b0916885 | ||
| 
						 | 
					964e29cd9e | ||
| 
						 | 
					31932499a9 | ||
| 
						 | 
					b155881de9 | ||
| 
						 | 
					010435ecaf | ||
| 
						 | 
					0863d080a4 | ||
| 
						 | 
					99837db81a | ||
| 
						 | 
					b4df862579 | ||
| 
						 | 
					01c6eb3a67 | ||
| 
						 | 
					5aabc88723 | ||
| 
						 | 
					23340f5d24 | ||
| 
						 | 
					77dcf87e6a | ||
| 
						 | 
					d9cefc3777 | ||
| 
						 | 
					7d6806e1fb | ||
| 
						 | 
					86d438c3a1 | ||
| 
						 | 
					fdc381e501 | ||
| 
						 | 
					3b1b8a7da2 | ||
| 
						 | 
					96f2c9c990 | ||
| 
						 | 
					349827aa97 | ||
| 
						 | 
					4dc458c605 | ||
| 
						 | 
					b5b6048697 | ||
| 
						 | 
					dc5fcb83e8 | ||
| 
						 | 
					db86049a3e | ||
| 
						 | 
					e6ceca0bc7 | ||
| 
						 | 
					d24425efad | ||
| 
						 | 
					3dda41df94 | ||
| 
						 | 
					fc77ca85e4 | ||
| 
						 | 
					db09b9cc36 | ||
| 
						 | 
					9f933c1e56 | ||
| 
						 | 
					efe45185fc | ||
| 
						 | 
					0a56fee31e | ||
| 
						 | 
					20048d442a | ||
| 
						 | 
					b1be93155c | ||
| 
						 | 
					1e2eb31560 | ||
| 
						 | 
					ca701632e1 | ||
| 
						 | 
					c3c5a7584b | ||
| 
						 | 
					3cd1fc7bce | ||
| 
						 | 
					1c7a39438c | ||
| 
						 | 
					46728b01fe | ||
| 
						 | 
					e0abf63778 | ||
| 
						 | 
					4451f07990 | ||
| 
						 | 
					6776912a42 | ||
| 
						 | 
					b914fd95df | ||
| 
						 | 
					f33afd9163 | ||
| 
						 | 
					c811b51a0a | ||
| 
						 | 
					ccbf86196b | ||
| 
						 | 
					64366a0b34 | ||
| 
						 | 
					183c459549 | ||
| 
						 | 
					44e62f73d4 | ||
| 
						 | 
					2f97e14f4d | ||
| 
						 | 
					7cd5a8d771 | ||
| 
						 | 
					9846bfd067 | 
							
								
								
									
										125
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										125
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -10,8 +10,133 @@
 | 
			
		||||
> [!CAUTION]
 | 
			
		||||
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
 | 
			
		||||
 | 
			
		||||
## 2025-08-09
 | 
			
		||||
 | 
			
		||||
## 2025-08-08
 | 
			
		||||
 | 
			
		||||
### 🆕 New Scripts
 | 
			
		||||
 | 
			
		||||
  - Palmr ([#6642](https://github.com/community-scripts/ProxmoxVE/pull/6642))
 | 
			
		||||
- HortusFox ([#6641](https://github.com/community-scripts/ProxmoxVE/pull/6641))
 | 
			
		||||
 | 
			
		||||
### 🚀 Updated Scripts
 | 
			
		||||
 | 
			
		||||
  - #### 🐞 Bug Fixes
 | 
			
		||||
 | 
			
		||||
    - Unifi: Update libssl dependency [@tremor021](https://github.com/tremor021) ([#6680](https://github.com/community-scripts/ProxmoxVE/pull/6680))
 | 
			
		||||
    - HomeBox: Fix checking for existing install [@tremor021](https://github.com/tremor021) ([#6677](https://github.com/community-scripts/ProxmoxVE/pull/6677))
 | 
			
		||||
    - Immich: unpin libvips revision [@vhsdream](https://github.com/vhsdream) ([#6669](https://github.com/community-scripts/ProxmoxVE/pull/6669))
 | 
			
		||||
    - Meilisearch: fix wrong path switch [@MickLesk](https://github.com/MickLesk) ([#6668](https://github.com/community-scripts/ProxmoxVE/pull/6668))
 | 
			
		||||
    - MariaDB: fix "feedback" (statistical informations) whiptail  [@MickLesk](https://github.com/MickLesk) ([#6657](https://github.com/community-scripts/ProxmoxVE/pull/6657))
 | 
			
		||||
    - Karakeep: workaround/fix for #6593 [@vhsdream](https://github.com/vhsdream) ([#6648](https://github.com/community-scripts/ProxmoxVE/pull/6648))
 | 
			
		||||
 | 
			
		||||
  - #### ✨ New Features
 | 
			
		||||
 | 
			
		||||
    - Feature: FSTrim (Filesystem Trim) - Log / LVM Check / ZFS [@MickLesk](https://github.com/MickLesk) ([#6660](https://github.com/community-scripts/ProxmoxVE/pull/6660))
 | 
			
		||||
    - IP Tag: Allow installation on PVE 9.x [@webhdx](https://github.com/webhdx) ([#6679](https://github.com/community-scripts/ProxmoxVE/pull/6679))
 | 
			
		||||
 | 
			
		||||
  - #### 🔧 Refactor
 | 
			
		||||
 | 
			
		||||
    - Refactor: Alpine IT-Tools [@tremor021](https://github.com/tremor021) ([#6579](https://github.com/community-scripts/ProxmoxVE/pull/6579))
 | 
			
		||||
    - Refactor: ArchiveBox [@MickLesk](https://github.com/MickLesk) ([#6670](https://github.com/community-scripts/ProxmoxVE/pull/6670))
 | 
			
		||||
    - Refactor: Bazarr [@MickLesk](https://github.com/MickLesk) ([#6663](https://github.com/community-scripts/ProxmoxVE/pull/6663))
 | 
			
		||||
    - Refactor: Kometa [@MickLesk](https://github.com/MickLesk) ([#6673](https://github.com/community-scripts/ProxmoxVE/pull/6673))
 | 
			
		||||
 | 
			
		||||
## 2025-08-07
 | 
			
		||||
 | 
			
		||||
### 🚀 Updated Scripts
 | 
			
		||||
 | 
			
		||||
  - #### 🐞 Bug Fixes
 | 
			
		||||
 | 
			
		||||
    - Commafeed: Fix Backup Handling while Update [@MickLesk](https://github.com/MickLesk) ([#6629](https://github.com/community-scripts/ProxmoxVE/pull/6629))
 | 
			
		||||
    - VictoriaMetrics: Fix release fetching [@tremor021](https://github.com/tremor021) ([#6632](https://github.com/community-scripts/ProxmoxVE/pull/6632))
 | 
			
		||||
 | 
			
		||||
  - #### ✨ New Features
 | 
			
		||||
 | 
			
		||||
    - Feature: Post-PVE-Script (PVE9 Support + some Features) [@MickLesk](https://github.com/MickLesk) ([#6626](https://github.com/community-scripts/ProxmoxVE/pull/6626))
 | 
			
		||||
    - Feature: Clean-LXC now supports Alpine based containers [@MickLesk](https://github.com/MickLesk) ([#6628](https://github.com/community-scripts/ProxmoxVE/pull/6628))
 | 
			
		||||
 | 
			
		||||
  - #### 🔧 Refactor
 | 
			
		||||
 | 
			
		||||
    - Refactor: Tandoor v2  [@MickLesk](https://github.com/MickLesk) ([#6635](https://github.com/community-scripts/ProxmoxVE/pull/6635))
 | 
			
		||||
    - Refactor: Paymenter [@tremor021](https://github.com/tremor021) ([#6589](https://github.com/community-scripts/ProxmoxVE/pull/6589))
 | 
			
		||||
 | 
			
		||||
## 2025-08-06
 | 
			
		||||
 | 
			
		||||
### 🚀 Updated Scripts
 | 
			
		||||
 | 
			
		||||
  - #### 🐞 Bug Fixes
 | 
			
		||||
 | 
			
		||||
    - [core] better y/N handling for ressource check [@MickLesk](https://github.com/MickLesk) ([#6608](https://github.com/community-scripts/ProxmoxVE/pull/6608))
 | 
			
		||||
    - fix: update Pulse scripts for v4 Go rewrite support [@rcourtman](https://github.com/rcourtman) ([#6574](https://github.com/community-scripts/ProxmoxVE/pull/6574))
 | 
			
		||||
    - OpenProject: Fix missing apt update [@tremor021](https://github.com/tremor021) ([#6598](https://github.com/community-scripts/ProxmoxVE/pull/6598))
 | 
			
		||||
 | 
			
		||||
  - #### ✨ New Features
 | 
			
		||||
 | 
			
		||||
    - PVE9: Remove Beta Whiptail / add correct version check [@MickLesk](https://github.com/MickLesk) ([#6599](https://github.com/community-scripts/ProxmoxVE/pull/6599))
 | 
			
		||||
 | 
			
		||||
## 2025-08-05
 | 
			
		||||
 | 
			
		||||
### 🚀 Updated Scripts
 | 
			
		||||
 | 
			
		||||
  - #### ✨ New Features
 | 
			
		||||
 | 
			
		||||
    - NIC offloading: e1000 support [@rcastley](https://github.com/rcastley) ([#6575](https://github.com/community-scripts/ProxmoxVE/pull/6575))
 | 
			
		||||
 | 
			
		||||
  - #### 💥 Breaking Changes
 | 
			
		||||
 | 
			
		||||
    - Temporary Remove: SearXNG [@MickLesk](https://github.com/MickLesk) ([#6578](https://github.com/community-scripts/ProxmoxVE/pull/6578))
 | 
			
		||||
 | 
			
		||||
  - #### 🔧 Refactor
 | 
			
		||||
 | 
			
		||||
    - Refactor: Prometheus Alertmanager [@tremor021](https://github.com/tremor021) ([#6577](https://github.com/community-scripts/ProxmoxVE/pull/6577))
 | 
			
		||||
 | 
			
		||||
## 2025-08-04
 | 
			
		||||
 | 
			
		||||
### 🆕 New Scripts
 | 
			
		||||
 | 
			
		||||
  - Tududi ([#6534](https://github.com/community-scripts/ProxmoxVE/pull/6534))
 | 
			
		||||
- ots ([#6532](https://github.com/community-scripts/ProxmoxVE/pull/6532))
 | 
			
		||||
 | 
			
		||||
### 🚀 Updated Scripts
 | 
			
		||||
 | 
			
		||||
  - #### 🐞 Bug Fixes
 | 
			
		||||
 | 
			
		||||
    - MySpeed: fix update and copy old tests back [@MickLesk](https://github.com/MickLesk) ([#6550](https://github.com/community-scripts/ProxmoxVE/pull/6550))
 | 
			
		||||
    - Composer: PATH Issues when updating [@MickLesk](https://github.com/MickLesk) ([#6543](https://github.com/community-scripts/ProxmoxVE/pull/6543))
 | 
			
		||||
 | 
			
		||||
  - #### ✨ New Features
 | 
			
		||||
 | 
			
		||||
    - Feat: enable tun for VPN services (wireguard) [@MickLesk](https://github.com/MickLesk) ([#6562](https://github.com/community-scripts/ProxmoxVE/pull/6562))
 | 
			
		||||
    - turnkey: add hostname & Fix TUN access [@masterofrpm](https://github.com/masterofrpm) ([#6512](https://github.com/community-scripts/ProxmoxVE/pull/6512))
 | 
			
		||||
    - Increase: Core Network check (pre-LXC Creation)  [@MickLesk](https://github.com/MickLesk) ([#6546](https://github.com/community-scripts/ProxmoxVE/pull/6546))
 | 
			
		||||
 | 
			
		||||
  - #### 🔧 Refactor
 | 
			
		||||
 | 
			
		||||
    - Refactor: PrivateBin [@tremor021](https://github.com/tremor021) ([#6559](https://github.com/community-scripts/ProxmoxVE/pull/6559))
 | 
			
		||||
    - Refactor: PocketID [@tremor021](https://github.com/tremor021) ([#6556](https://github.com/community-scripts/ProxmoxVE/pull/6556))
 | 
			
		||||
    - Refactor: Pocketbase [@tremor021](https://github.com/tremor021) ([#6554](https://github.com/community-scripts/ProxmoxVE/pull/6554))
 | 
			
		||||
    - Refactor: NocoDB [@tremor021](https://github.com/tremor021) ([#6548](https://github.com/community-scripts/ProxmoxVE/pull/6548))
 | 
			
		||||
    - Refactor: PairDrop [@tremor021](https://github.com/tremor021) ([#6528](https://github.com/community-scripts/ProxmoxVE/pull/6528))
 | 
			
		||||
 | 
			
		||||
## 2025-08-03
 | 
			
		||||
 | 
			
		||||
### 🚀 Updated Scripts
 | 
			
		||||
 | 
			
		||||
  - #### 🐞 Bug Fixes
 | 
			
		||||
 | 
			
		||||
    - docmost: remove build step due new version [@MickLesk](https://github.com/MickLesk) ([#6513](https://github.com/community-scripts/ProxmoxVE/pull/6513))
 | 
			
		||||
    - Fix: Komga uses .komga as storage / so it fails after install [@MickLesk](https://github.com/MickLesk) ([#6517](https://github.com/community-scripts/ProxmoxVE/pull/6517))
 | 
			
		||||
 | 
			
		||||
  - #### 💥 Breaking Changes
 | 
			
		||||
 | 
			
		||||
    - Remove: Ubuntu 24.10-VM [@MickLesk](https://github.com/MickLesk) ([#6515](https://github.com/community-scripts/ProxmoxVE/pull/6515))
 | 
			
		||||
 | 
			
		||||
  - #### 🔧 Refactor
 | 
			
		||||
 | 
			
		||||
    - Refactor: openHAB [@tremor021](https://github.com/tremor021) ([#6524](https://github.com/community-scripts/ProxmoxVE/pull/6524))
 | 
			
		||||
    - Refactor: OpenProject [@tremor021](https://github.com/tremor021) ([#6525](https://github.com/community-scripts/ProxmoxVE/pull/6525))
 | 
			
		||||
 | 
			
		||||
## 2025-08-02
 | 
			
		||||
 | 
			
		||||
### 🚀 Updated Scripts
 | 
			
		||||
 
 | 
			
		||||
@@ -27,16 +27,15 @@ function update_script() {
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/sharevb/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
 | 
			
		||||
  if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then
 | 
			
		||||
    DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
 | 
			
		||||
    msg_info "Updating ${APP} LXC"
 | 
			
		||||
    curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
 | 
			
		||||
    curl -fsSL "https://github.com/sharevb/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" -o it-tools.zip
 | 
			
		||||
    mkdir -p /usr/share/nginx/html
 | 
			
		||||
    rm -rf /usr/share/nginx/html/*
 | 
			
		||||
    $STD unzip it-tools.zip -d /tmp/it-tools
 | 
			
		||||
    cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
 | 
			
		||||
    rm -rf /tmp/it-tools
 | 
			
		||||
    $STD unzip it-tools.zip -d /tmp
 | 
			
		||||
    cp -r /tmp/dist/* /usr/share/nginx/html
 | 
			
		||||
    rm -rf /tmp/dist
 | 
			
		||||
    rm -f it-tools.zip
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,7 @@ var_disk="${var_disk:-1}"
 | 
			
		||||
var_os="${var_os:-alpine}"
 | 
			
		||||
var_version="${var_version:-3.22}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
var_tun="${var_tun:-1}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
 
 | 
			
		||||
@@ -27,19 +27,28 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
    msg_info "Stopping ${APP}"
 | 
			
		||||
 | 
			
		||||
  NODE_VERSION="22" setup_nodejs
 | 
			
		||||
  PYTHON_VERSION="3.13" setup_uv
 | 
			
		||||
 | 
			
		||||
  msg_info "Stopping ArchiveBox"
 | 
			
		||||
  systemctl stop archivebox
 | 
			
		||||
    msg_ok "Stopped ${APP}"
 | 
			
		||||
  msg_ok "Stopped ArchiveBox"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP}"
 | 
			
		||||
  msg_info "Upgrading Playwright"
 | 
			
		||||
  $STD uv pip install playwright --system
 | 
			
		||||
  $STD playwright install-deps chromium
 | 
			
		||||
  msg_ok "Upgraded Playwright"
 | 
			
		||||
 | 
			
		||||
  msg_info "Updating ArchiveBox"
 | 
			
		||||
  cd /opt/archivebox/data
 | 
			
		||||
    pip install --upgrade --ignore-installed archivebox
 | 
			
		||||
  uv --system pip install --upgrade --ignore-installed archivebox
 | 
			
		||||
  sudo -u archivebox archivebox init
 | 
			
		||||
    msg_ok "Updated ${APP}"
 | 
			
		||||
  msg_ok "Updated ArchiveBox"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
  msg_info "Starting ArchiveBox"
 | 
			
		||||
  systemctl start archivebox
 | 
			
		||||
    msg_ok "Started ${APP}"
 | 
			
		||||
  msg_ok "Started ArchiveBox"
 | 
			
		||||
 | 
			
		||||
  msg_ok "Updated Successfully"
 | 
			
		||||
  exit
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										26
									
								
								ct/bazarr.sh
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								ct/bazarr.sh
									
									
									
									
									
								
							@@ -27,13 +27,29 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
    msg_info "Updating $APP LXC"
 | 
			
		||||
    $STD apt-get update
 | 
			
		||||
    $STD apt-get -y upgrade
 | 
			
		||||
    msg_ok "Updated $APP LXC"
 | 
			
		||||
 | 
			
		||||
  if ! command -v jq &>/dev/null; then
 | 
			
		||||
    $STD apt-get install -y jq
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/morpheus65535/bazarr/releases/latest | jq -r '.tag_name' | sed 's/^v//')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.bazarr 2>/dev/null)" ]] || [[ ! -f ~/.bazarr ]]; then
 | 
			
		||||
 | 
			
		||||
    PYTHON_VERSION="3.13" setup_uv
 | 
			
		||||
    fetch_and_deploy_gh_release "bazarr" "morpheus65535/bazarr" "prebuild" "latest" "/opt/bazarr" "bazarr.zip"
 | 
			
		||||
 | 
			
		||||
    msg_info "Setup Bazarr"
 | 
			
		||||
    mkdir -p /var/lib/bazarr/
 | 
			
		||||
    chmod 775 /opt/bazarr /var/lib/bazarr/
 | 
			
		||||
    $STD uv pip install -r /opt/bazarr/requirements.txt --system
 | 
			
		||||
    msg_ok "Setup Bazarr"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Update Successful"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ function update_script() {
 | 
			
		||||
        systemctl stop cleanuparr
 | 
			
		||||
        msg_ok "Stopped ${APP}"
 | 
			
		||||
 | 
			
		||||
        fetch_and_deploy_gh_release "Cleanuparr" "Cleanuparr/Cleanuparr" "prebuild" "$RELEASE" "/opt/cleanuparr" "*linux-amd64.zip"
 | 
			
		||||
        fetch_and_deploy_gh_release "Cleanuparr" "Cleanuparr/Cleanuparr" "prebuild" "latest" "/opt/cleanuparr" "*linux-amd64.zip"
 | 
			
		||||
 | 
			
		||||
        msg_info "Starting ${APP}"
 | 
			
		||||
        systemctl start cleanuparr
 | 
			
		||||
 
 | 
			
		||||
@@ -40,16 +40,20 @@ function update_script() {
 | 
			
		||||
      $STD apt-get install -y rsync
 | 
			
		||||
      msg_ok "Installed Dependencies"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ -d /opt/commafeed/data ] && [ "$(ls -A /opt/commafeed/data)" ]; then
 | 
			
		||||
      msg_info "Backing up existing data"
 | 
			
		||||
      mv /opt/commafeed/data /opt/data.bak
 | 
			
		||||
      msg_ok "Backed up existing data"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "commafeed" "Athou/commafeed" "prebuild" "latest" "/opt/commafeed" "commafeed-*-h2-jvm.zip"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP} to ${RELEASE}"
 | 
			
		||||
    if [ -d /opt/commafeed/data.bak ] && [ "$(ls -A /opt/commafeed/data.bak)" ]; then
 | 
			
		||||
      mv /opt/commafeed/data.bak /opt/commafeed/data
 | 
			
		||||
    if [ -d /opt/data.bak ] && [ "$(ls -A /opt/data.bak)" ]; then
 | 
			
		||||
      msg_info "Restoring data"
 | 
			
		||||
      mv /opt/data.bak /opt/commafeed/data
 | 
			
		||||
      msg_ok "Restored data"
 | 
			
		||||
    fi
 | 
			
		||||
    msg_ok "Updated ${APP} to ${RELEASE}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
    systemctl start commafeed
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,6 @@ function update_script() {
 | 
			
		||||
    mv /opt/.env /opt/docmost/.env
 | 
			
		||||
    mv /opt/data /opt/docmost/data
 | 
			
		||||
    $STD pnpm install --force
 | 
			
		||||
    $STD pnpm nx run server:build # Dirty fix https://github.com/community-scripts/ProxmoxVE/issues/6377
 | 
			
		||||
    $STD pnpm build
 | 
			
		||||
    msg_ok "Updated ${APP}"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
    __  __                        ___              _      __              __        ______              
 | 
			
		||||
   / / / /___  ____ ___  ___     /   |  __________(_)____/ /_____ _____  / /_      / ____/___  ________ 
 | 
			
		||||
  / /_/ / __ \/ __ `__ \/ _ \   / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/_____/ /   / __ \/ ___/ _ \
 | 
			
		||||
 / __  / /_/ / / / / / /  __/  / ___ |(__  |__  ) (__  ) /_/ /_/ / / / / /_/_____/ /___/ /_/ / /  /  __/
 | 
			
		||||
/_/ /_/\____/_/ /_/ /_/\___/  /_/  |_/____/____/_/____/\__/\__,_/_/ /_/\__/      \____/\____/_/   \___/ 
 | 
			
		||||
                                                                                                        
 | 
			
		||||
							
								
								
									
										6
									
								
								ct/headers/hortusfox
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								ct/headers/hortusfox
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
    __  __           __             ______          
 | 
			
		||||
   / / / /___  _____/ /___  _______/ ____/___  _  __
 | 
			
		||||
  / /_/ / __ \/ ___/ __/ / / / ___/ /_  / __ \| |/_/
 | 
			
		||||
 / __  / /_/ / /  / /_/ /_/ (__  ) __/ / /_/ />  <  
 | 
			
		||||
/_/ /_/\____/_/   \__/\__,_/____/_/    \____/_/|_|  
 | 
			
		||||
                                                    
 | 
			
		||||
							
								
								
									
										6
									
								
								ct/headers/ots
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								ct/headers/ots
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
   ____  ___________
 | 
			
		||||
  / __ \/_  __/ ___/
 | 
			
		||||
 / / / / / /  \__ \ 
 | 
			
		||||
/ /_/ / / /  ___/ / 
 | 
			
		||||
\____/ /_/  /____/  
 | 
			
		||||
                    
 | 
			
		||||
							
								
								
									
										6
									
								
								ct/headers/palmr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								ct/headers/palmr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
    ____        __              
 | 
			
		||||
   / __ \____ _/ /___ ___  _____
 | 
			
		||||
  / /_/ / __ `/ / __ `__ \/ ___/
 | 
			
		||||
 / ____/ /_/ / / / / / / / /    
 | 
			
		||||
/_/    \__,_/_/_/ /_/ /_/_/     
 | 
			
		||||
                                
 | 
			
		||||
							
								
								
									
										6
									
								
								ct/headers/tududi
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								ct/headers/tududi
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
  ______          __          ___ 
 | 
			
		||||
 /_  __/_  ______/ /_  ______/ (_)
 | 
			
		||||
  / / / / / / __  / / / / __  / / 
 | 
			
		||||
 / / / /_/ / /_/ / /_/ / /_/ / /  
 | 
			
		||||
/_/  \__,_/\__,_/\__,_/\__,_/_/   
 | 
			
		||||
                                  
 | 
			
		||||
@@ -1,165 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://www.home-assistant.io/
 | 
			
		||||
 | 
			
		||||
APP="Home Assistant-Core"
 | 
			
		||||
var_tags="${var_tags:-automation;smarthome}"
 | 
			
		||||
var_cpu="${var_cpu:-2}"
 | 
			
		||||
var_ram="${var_ram:-2048}"
 | 
			
		||||
var_disk="${var_disk:-10}"
 | 
			
		||||
var_os="${var_os:-ubuntu}"
 | 
			
		||||
var_version="${var_version:-24.10}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  if ! lsb_release -d | grep -q "Ubuntu 24.10"; then
 | 
			
		||||
    msg_error "Wrong OS detected. This script only supports Ubuntu 24.10."
 | 
			
		||||
    msg_error "Read Guide: https://github.com/community-scripts/ProxmoxVE/discussions/1549"
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
  if [[ ! -d /srv/homeassistant ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
  setup_uv
 | 
			
		||||
  IP=$(hostname -I | awk '{print $1}')
 | 
			
		||||
  UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
 | 
			
		||||
    "1" "Update Core" ON \
 | 
			
		||||
    "2" "Install HACS" OFF \
 | 
			
		||||
    "3" "Install FileBrowser" OFF \
 | 
			
		||||
    3>&1 1>&2 2>&3)
 | 
			
		||||
 | 
			
		||||
  if [ "$UPD" == "1" ]; then
 | 
			
		||||
    if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then
 | 
			
		||||
      clear
 | 
			
		||||
      header_info
 | 
			
		||||
      echo -e "${GN}Updating to Beta Version${CL}"
 | 
			
		||||
      BR="--pre"
 | 
			
		||||
    else
 | 
			
		||||
      clear
 | 
			
		||||
      header_info
 | 
			
		||||
      echo -e "${GN}Updating to Stable Version${CL}"
 | 
			
		||||
      BR=""
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    msg_info "Stopping Home Assistant"
 | 
			
		||||
    systemctl stop homeassistant
 | 
			
		||||
    msg_ok "Stopped Home Assistant"
 | 
			
		||||
 | 
			
		||||
    if [[ -d /srv/homeassistant/bin ]]; then
 | 
			
		||||
      msg_info "Migrating to .venv-based structure"
 | 
			
		||||
      $STD source /srv/homeassistant/bin/activate
 | 
			
		||||
      PY_VER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
 | 
			
		||||
      $STD deactivate
 | 
			
		||||
      mv /srv/homeassistant "/srv/homeassistant_backup_$PY_VER"
 | 
			
		||||
      mkdir -p /srv/homeassistant
 | 
			
		||||
      cd /srv/homeassistant
 | 
			
		||||
 | 
			
		||||
      $STD uv python install 3.13
 | 
			
		||||
      UV_PYTHON=$(uv python list | awk '/3\.13\.[0-9]+.*\/root\/.local/ {print $2; exit}')
 | 
			
		||||
      if [[ -z "$UV_PYTHON" ]]; then
 | 
			
		||||
        msg_error "No local Python 3.13 found via uv"
 | 
			
		||||
        exit 1
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      $STD uv venv .venv --python "$UV_PYTHON"
 | 
			
		||||
      $STD source .venv/bin/activate
 | 
			
		||||
      $STD uv pip install homeassistant mysqlclient psycopg2-binary isal webrtcvad wheel
 | 
			
		||||
      mkdir -p /root/.homeassistant
 | 
			
		||||
      msg_ok "Migration complete"
 | 
			
		||||
    else
 | 
			
		||||
      source /srv/homeassistant/.venv/bin/activate
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating Home Assistant"
 | 
			
		||||
    $STD uv pip install $BR --upgrade homeassistant
 | 
			
		||||
    msg_ok "Updated Home Assistant"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting Home Assistant"
 | 
			
		||||
    if [[ -f /etc/systemd/system/homeassistant.service ]] && grep -q "/srv/homeassistant/bin/python3" /etc/systemd/system/homeassistant.service; then
 | 
			
		||||
      sed -i 's|ExecStart=/srv/homeassistant/bin/python3|ExecStart=/srv/homeassistant/.venv/bin/python3|' /etc/systemd/system/homeassistant.service
 | 
			
		||||
      sed -i 's|PATH=/srv/homeassistant/bin|PATH=/srv/homeassistant/.venv/bin|' /etc/systemd/system/homeassistant.service
 | 
			
		||||
      $STD systemctl daemon-reload
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    systemctl start homeassistant
 | 
			
		||||
    sleep 5
 | 
			
		||||
    msg_ok "Started Home Assistant"
 | 
			
		||||
    msg_ok "Update Successful"
 | 
			
		||||
    echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8123${CL}"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if [ "$UPD" == "2" ]; then
 | 
			
		||||
    msg_info "Installing Home Assistant Community Store (HACS)"
 | 
			
		||||
    $STD apt update
 | 
			
		||||
    cd /root/.homeassistant
 | 
			
		||||
    $STD bash <(curl -fsSL https://get.hacs.xyz)
 | 
			
		||||
    msg_ok "Installed Home Assistant Community Store (HACS)"
 | 
			
		||||
    echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if [ "$UPD" == "3" ]; then
 | 
			
		||||
    set +Eeuo pipefail
 | 
			
		||||
    read -r -p "${TAB3}Would you like to use No Authentication? <y/N> " prompt
 | 
			
		||||
    msg_info "Installing FileBrowser"
 | 
			
		||||
    RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g')
 | 
			
		||||
    $STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin
 | 
			
		||||
 | 
			
		||||
    if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
			
		||||
      $STD filebrowser config init -a '0.0.0.0'
 | 
			
		||||
      $STD filebrowser config set -a '0.0.0.0'
 | 
			
		||||
      $STD filebrowser config set --auth.method=noauth
 | 
			
		||||
      $STD filebrowser users add ID 1 --perm.admin
 | 
			
		||||
    else
 | 
			
		||||
      $STD filebrowser config init -a '0.0.0.0'
 | 
			
		||||
      $STD filebrowser config set -a '0.0.0.0'
 | 
			
		||||
      $STD filebrowser users add admin helper-scripts.com --perm.admin
 | 
			
		||||
    fi
 | 
			
		||||
    msg_ok "Installed FileBrowser"
 | 
			
		||||
 | 
			
		||||
    msg_info "Creating Service"
 | 
			
		||||
    cat <<EOF >/etc/systemd/system/filebrowser.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Filebrowser
 | 
			
		||||
After=network-online.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
User=root
 | 
			
		||||
WorkingDirectory=/root/
 | 
			
		||||
ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=default.target
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
    systemctl enable --now -q filebrowser.service
 | 
			
		||||
    msg_ok "Created Service"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Completed Successfully!\n"
 | 
			
		||||
    echo -e "FileBrowser should be reachable by going to the following URL.
 | 
			
		||||
         ${BL}http://$IP:8080${CL}   admin|helper-scripts.com\n"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8123${CL}"
 | 
			
		||||
@@ -22,7 +22,7 @@ function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
  if [[ ! -d /opt/homebox ]]; then
 | 
			
		||||
  if [[ ! -f /etc/systemd/system/homebox.service ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										73
									
								
								ct/hortusfox.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								ct/hortusfox.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,73 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://github.com/danielbrendel/hortusfox-web
 | 
			
		||||
 | 
			
		||||
APP="HortusFox"
 | 
			
		||||
var_tags="${var_tags:-plants}"
 | 
			
		||||
var_cpu="${var_cpu:-2}"
 | 
			
		||||
var_ram="${var_ram:-2048}"
 | 
			
		||||
var_disk="${var_disk:-5}"
 | 
			
		||||
var_os="${var_os:-debian}"
 | 
			
		||||
var_version="${var_version:-12}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
  if [[ ! -d /opt/hortusfox ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/danielbrendel/hortusfox-web/releases/latest | jq -r .tag_name | sed 's/^v//')
 | 
			
		||||
  if [[ ! -f ~/.hortusfox ]] || [[ "${RELEASE}" != "$(cat ~/.hortusfox)" ]]; then
 | 
			
		||||
    msg_info "Stopping Service"
 | 
			
		||||
    systemctl stop apache2
 | 
			
		||||
    msg_ok "Stopped Service"
 | 
			
		||||
 | 
			
		||||
    msg_info "Backing up current HortusFox installation"
 | 
			
		||||
    cd /opt
 | 
			
		||||
    mv /opt/hortusfox/ /opt/hortusfox-backup
 | 
			
		||||
    msg_ok "Backed up current HortusFox installation"
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "hortusfox" "danielbrendel/hortusfox-web"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating HortusFox"
 | 
			
		||||
    cd /opt/hortusfox
 | 
			
		||||
    mv /opt/hortusfox-backup/.env /opt/hortusfox/.env
 | 
			
		||||
    $STD composer install --no-dev --optimize-autoloader
 | 
			
		||||
    $STD php asatru migrate --no-interaction
 | 
			
		||||
    $STD php asatru plants:attributes
 | 
			
		||||
    $STD php asatru calendar:classes
 | 
			
		||||
    msg_ok "Updated HortusFox"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting Service"
 | 
			
		||||
    systemctl start apache2
 | 
			
		||||
    msg_ok "Started Service"
 | 
			
		||||
 | 
			
		||||
    msg_info "Cleaning up"
 | 
			
		||||
    rm -r /opt/hortusfox-backup
 | 
			
		||||
    msg_ok "Cleaned"
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
 | 
			
		||||
@@ -315,8 +315,7 @@ function compile_imagemagick() {
 | 
			
		||||
 | 
			
		||||
function compile_libvips() {
 | 
			
		||||
  SOURCE=$SOURCE_DIR/libvips
 | 
			
		||||
  # : "${LIBVIPS_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libvips.json)}"
 | 
			
		||||
  : "${LIBVIPS_REVISION:=8fa37a64547e392d3808eed8d72adab7e02b3d00}"
 | 
			
		||||
  : "${LIBVIPS_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libvips.json)}"
 | 
			
		||||
  if [[ "${update:-}" ]] || [[ "$LIBVIPS_REVISION" != "$(grep 'libvips' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
 | 
			
		||||
    msg_info "Recompiling libvips"
 | 
			
		||||
    if [[ -d "$SOURCE" ]]; then rm -rf "$SOURCE"; fi
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@ function update_script() {
 | 
			
		||||
  cd /opt/karakeep/apps/cli
 | 
			
		||||
  $STD pnpm install --frozen-lockfile
 | 
			
		||||
  $STD pnpm build
 | 
			
		||||
  DATA_DIR="$(sed -n '/^DATA_DIR/p' /etc/karakeep/karakeep.env | awk -F= '{print $2}')"
 | 
			
		||||
  DATA_DIR="$(sed -n '/^DATA_DIR/p' /etc/karakeep/karakeep.env | awk -F= '{print $2}' | tr -d '="=')"
 | 
			
		||||
  export DATA_DIR="${DATA_DIR:-/opt/karakeep_data}"
 | 
			
		||||
  cd /opt/karakeep/packages/db
 | 
			
		||||
  $STD pnpm migrate
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										51
									
								
								ct/kometa.sh
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								ct/kometa.sh
									
									
									
									
									
								
							@@ -24,45 +24,40 @@ function update_script() {
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
 | 
			
		||||
    if [[ ! -f "/opt/kometa/kometa.py" ]]; then
 | 
			
		||||
  if [[ ! -d "/opt/kometa" ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
    RELEASE=$(curl -fsSL https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
    if [[ "${RELEASE}" != "$(cat /opt/kometa_version.txt)" ]] || [[ ! -f /opt/kometa_version.txt ]]; then
 | 
			
		||||
        msg_info "Updating $APP"
 | 
			
		||||
        msg_info "Stopping $APP"
 | 
			
		||||
        systemctl stop kometa
 | 
			
		||||
        msg_ok "Stopped $APP"
 | 
			
		||||
  if ! command -v jq &>/dev/null; then
 | 
			
		||||
    $STD apt-get install -y jq
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
        msg_info "Updating $APP to ${RELEASE}"
 | 
			
		||||
        cd /tmp
 | 
			
		||||
        temp_file=$(mktemp)
 | 
			
		||||
        RELEASE=$(curl -fsSL https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
curl -fsSL "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -o ""$temp_file""
 | 
			
		||||
        tar -xzf "$temp_file"
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | jq -r '.tag_name | sub("^v";"")')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.kometa 2>/dev/null)" ]] || [[ ! -f ~/.kometa ]]; then
 | 
			
		||||
    msg_info "Stopping Service"
 | 
			
		||||
    systemctl stop kometa
 | 
			
		||||
    msg_ok "Stopped Service"
 | 
			
		||||
 | 
			
		||||
    msg_info "Backing up data"
 | 
			
		||||
    cp /opt/kometa/config/config.yml /opt
 | 
			
		||||
        rm -rf /opt/kometa
 | 
			
		||||
        mv Kometa-${RELEASE} /opt/kometa
 | 
			
		||||
        cd /opt/kometa
 | 
			
		||||
        rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
 | 
			
		||||
        $STD pip install -r requirements.txt --ignore-installed
 | 
			
		||||
    msg_ok "Backup completed"
 | 
			
		||||
 | 
			
		||||
    PYTHON_VERSION="3.12" setup_uv
 | 
			
		||||
    $STD uv python update-shell
 | 
			
		||||
    fetch_and_deploy_gh_release "kometa" "Kometa-Team/Kometa"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating Kometa"
 | 
			
		||||
    $STD uv pip install -r requirements.txt --system
 | 
			
		||||
    mkdir -p config/assets
 | 
			
		||||
    cp /opt/config.yml config/config.yml
 | 
			
		||||
        echo "${RELEASE}" >/opt/kometa_version.txt
 | 
			
		||||
        msg_ok "Updated $APP to ${RELEASE}"
 | 
			
		||||
    msg_ok "Updated Kometa"
 | 
			
		||||
 | 
			
		||||
        msg_info "Starting $APP"
 | 
			
		||||
    msg_info "Starting Service"
 | 
			
		||||
    systemctl start kometa
 | 
			
		||||
        msg_ok "Started $APP"
 | 
			
		||||
 | 
			
		||||
        msg_info "Cleaning Up"
 | 
			
		||||
        rm -f $temp_file
 | 
			
		||||
        msg_ok "Cleanup Completed"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Started Service"
 | 
			
		||||
    msg_ok "Update Successful"
 | 
			
		||||
  else
 | 
			
		||||
        msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ function update_script() {
 | 
			
		||||
    msg_ok "Stopped ${APP}"
 | 
			
		||||
 | 
			
		||||
    rm -f /opt/komga/komga.jar
 | 
			
		||||
    USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "komga" "gotson/komga" "singlefile" "latest" "/opt/komga" "komga*.jar"
 | 
			
		||||
    USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "komga-org" "gotson/komga" "singlefile" "latest" "/opt/komga" "komga*.jar"
 | 
			
		||||
    mv /opt/komga/komga-*.jar /opt/komga/komga.jar
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
 
 | 
			
		||||
@@ -24,10 +24,6 @@ function update_script() {
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
 | 
			
		||||
  if [[ ! -d /opt/meilisearch ]]; then
 | 
			
		||||
    msg_error "No Meilisearch Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Meilisearch Update" --radiolist --cancel-button Exit-Script "Spacebar = Select" 10 58 2 \
 | 
			
		||||
    "1" "Update Meilisearch" ON \
 | 
			
		||||
    "2" "Update Meilisearch-UI" OFF \
 | 
			
		||||
 
 | 
			
		||||
@@ -44,6 +44,7 @@ function update_script() {
 | 
			
		||||
    msg_info "Updating ${APP} to ${RELEASE}"
 | 
			
		||||
    cd /opt/myspeed
 | 
			
		||||
    $STD npm install
 | 
			
		||||
    cp -r /opt/myspeed_bak/data/* /opt/myspeed/data/
 | 
			
		||||
    msg_ok "Updated ${APP} to ${RELEASE}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP} Service"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								ct/nocodb.sh
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								ct/nocodb.sh
									
									
									
									
									
								
							@@ -27,14 +27,23 @@ function update_script() {
 | 
			
		||||
        msg_error "No ${APP} Installation Found!"
 | 
			
		||||
        exit
 | 
			
		||||
    fi
 | 
			
		||||
    msg_info "Updating ${APP}"
 | 
			
		||||
    systemctl stop nocodb.service
 | 
			
		||||
    cd /opt/nocodb
 | 
			
		||||
    rm -rf nocodb
 | 
			
		||||
    curl -fsSL http://get.nocodb.com/linux-x64 -o nocodb -L
 | 
			
		||||
    chmod +x nocodb
 | 
			
		||||
    systemctl start nocodb.service
 | 
			
		||||
 | 
			
		||||
    RELEASE=$(curl -fsSL https://api.github.com/repos/nocodb/nocodb/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
			
		||||
    if [[ ! -f ~/.nocodb ]] || [[ "${RELEASE}" != "$(cat ~/.nocodb)" ]]; then
 | 
			
		||||
    msg_info "Stopping Service"
 | 
			
		||||
    systemctl stop nocodb
 | 
			
		||||
    msg_ok "Stopped Service"
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting Service"
 | 
			
		||||
    systemctl start nocodb
 | 
			
		||||
    msg_ok "Started Service"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										58
									
								
								ct/ots.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								ct/ots.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,58 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: bvdberg01
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://github.com/Luzifer/ots
 | 
			
		||||
 | 
			
		||||
APP="OTS"
 | 
			
		||||
var_tags="${var_tags:-secrets-sharer}"
 | 
			
		||||
var_cpu="${var_cpu:-1}"
 | 
			
		||||
var_ram="${var_ram:-512}"
 | 
			
		||||
var_disk="${var_disk:-3}"
 | 
			
		||||
var_os="${var_os:-debian}"
 | 
			
		||||
var_version="${var_version:-12}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
    header_info
 | 
			
		||||
    check_container_storage
 | 
			
		||||
    check_container_resources
 | 
			
		||||
    if [[ ! -d /opt/ots ]]; then
 | 
			
		||||
        msg_error "No ${APP} Installation Found!"
 | 
			
		||||
        exit
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    RELEASE=$(curl -fsSL https://api.github.com/repos/Luzifer/ots/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
			
		||||
    if [[ "${RELEASE}" != "$(cat ~/.ots 2>/dev/null)" ]] || [[ ! -f ~/.ots ]]; then
 | 
			
		||||
        msg_info "Stopping ${APP} Service"
 | 
			
		||||
        systemctl stop ots
 | 
			
		||||
        systemctl stop nginx
 | 
			
		||||
        msg_ok "Stopped ${APP} Service"
 | 
			
		||||
 | 
			
		||||
        fetch_and_deploy_gh_release "ots" "Luzifer/ots" "prebuild" "latest" "/opt/ots" "ots_linux_amd64.tgz"
 | 
			
		||||
 | 
			
		||||
        msg_info "Stopping ${APP} Service"
 | 
			
		||||
        systemctl start ots
 | 
			
		||||
        systemctl start nginx
 | 
			
		||||
        msg_ok "Stopped ${APP} Service"
 | 
			
		||||
        msg_ok "Updated Successfully"
 | 
			
		||||
    else
 | 
			
		||||
        msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
			
		||||
    fi
 | 
			
		||||
    exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}${CL}"
 | 
			
		||||
@@ -27,13 +27,28 @@ function update_script() {
 | 
			
		||||
        msg_error "No ${APP} Installation Found!"
 | 
			
		||||
        exit
 | 
			
		||||
    fi
 | 
			
		||||
    msg_info "Updating $APP"
 | 
			
		||||
 | 
			
		||||
    RELEASE=$(curl -fsSL https://api.github.com/repos/schlagmichdoch/PairDrop/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
    if [[ ! -f ~/.pairdrop ]] || [[ "${RELEASE}" != "$(cat ~/.pairdrop)" ]]; then
 | 
			
		||||
      msg_info "Stopping ${APP}"
 | 
			
		||||
      systemctl stop pairdrop
 | 
			
		||||
      msg_ok "Stopped ${APP}"
 | 
			
		||||
      
 | 
			
		||||
      fetch_and_deploy_gh_release "pairdrop" "schlagmichdoch/PairDrop" "tarball"
 | 
			
		||||
 | 
			
		||||
      msg_info "Configuring PairDrop"
 | 
			
		||||
      cd /opt/pairdrop
 | 
			
		||||
    git pull
 | 
			
		||||
    npm install
 | 
			
		||||
      $STD npm install
 | 
			
		||||
      msg_ok "Configured PairDrop"
 | 
			
		||||
 | 
			
		||||
      msg_info "Starting ${APP}"
 | 
			
		||||
      systemctl start pairdrop
 | 
			
		||||
    msg_ok "Updated $APP"
 | 
			
		||||
      msg_ok "Started ${APP}"
 | 
			
		||||
 | 
			
		||||
      msg_ok "Updated Successfully"
 | 
			
		||||
    else
 | 
			
		||||
      msg_ok "No update required. ${APP} is already at ${RELEASE}."
 | 
			
		||||
    fi
 | 
			
		||||
    exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										80
									
								
								ct/palmr.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								ct/palmr.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,80 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: vhsdream
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://github.com/kyantech/Palmr
 | 
			
		||||
 | 
			
		||||
APP="Palmr"
 | 
			
		||||
var_tags="${var_tags:-files}"
 | 
			
		||||
var_cpu="${var_cpu:-4}"
 | 
			
		||||
var_ram="${var_ram:-4096}"
 | 
			
		||||
var_disk="${var_disk:-6}"
 | 
			
		||||
var_os="${var_os:-debian}"
 | 
			
		||||
var_version="${var_version:-12}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
  if [[ ! -d /opt/palmr_data ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/kyantech/palmr/releases/latest | jq '.tag_name' | sed 's/^v//')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.palmr 2>/dev/null)" ]] || [[ ! -f ~/.palmr ]]; then
 | 
			
		||||
    msg_info "Stopping Services"
 | 
			
		||||
    systemctl stop palmr-frontend palmr-backend
 | 
			
		||||
    msg_ok "Stopped Services"
 | 
			
		||||
 | 
			
		||||
    cp /opt/palmr/apps/server/.env /opt/palmr.env
 | 
			
		||||
    rm -rf /opt/palmr
 | 
			
		||||
    fetch_and_deploy_gh_release "Palmr" "kyantech/Palmr" "tarball" "latest" "/opt/palmr"
 | 
			
		||||
    
 | 
			
		||||
    PNPM="$(jq -r '.packageManager' /opt/palmr/package.json)"
 | 
			
		||||
    NODE_VERSION="20" NODE_MODULE="$PNPM" setup_nodejs
 | 
			
		||||
    
 | 
			
		||||
    msg_info "Updating ${APP}"
 | 
			
		||||
    cd /opt/palmr/apps/server
 | 
			
		||||
    mv /opt/palmr.env /opt/palmr/apps/server/.env
 | 
			
		||||
    $STD pnpm install
 | 
			
		||||
    $STD pnpm dlx prisma generate
 | 
			
		||||
    $STD pnpm dlx prisma migrate deploy
 | 
			
		||||
    $STD pnpm dlx prisma db push
 | 
			
		||||
    $STD pnpm build
 | 
			
		||||
 | 
			
		||||
    cd /opt/palmr/apps/web
 | 
			
		||||
    export NODE_ENV=production
 | 
			
		||||
    export NEXT_TELEMETRY_DISABLED=1
 | 
			
		||||
    mv ./.env.example ./.env
 | 
			
		||||
    $STD pnpm install
 | 
			
		||||
    $STD pnpm build
 | 
			
		||||
    chown -R palmr:palmr /opt/palmr_data /opt/palmr
 | 
			
		||||
    msg_ok "Updated $APP"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting Services"
 | 
			
		||||
    systemctl start palmr-backend palmr-frontend
 | 
			
		||||
    msg_ok "Started Services"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "Already up to date"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
 | 
			
		||||
@@ -23,32 +23,25 @@ function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
 | 
			
		||||
  if [[ ! -d /opt/paymenter ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
 | 
			
		||||
  if [[ "$CURRENT_PHP" != "8.3" ]]; then
 | 
			
		||||
    msg_info "Migrating PHP $CURRENT_PHP to 8.3"
 | 
			
		||||
    $STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
 | 
			
		||||
    $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
 | 
			
		||||
    $STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
 | 
			
		||||
    $STD apt-get update
 | 
			
		||||
    $STD apt-get remove -y php"${CURRENT_PHP//./}"*
 | 
			
		||||
    $STD apt-get install -y \
 | 
			
		||||
      php8.3 \
 | 
			
		||||
      php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,curl,zip,intl,redis,fpm}
 | 
			
		||||
    PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="common,mysql,fpm,redis" setup_php
 | 
			
		||||
    setup_composer
 | 
			
		||||
    sed -i 's|php8\.2-fpm\.sock|php8.3-fpm.sock|g' /etc/nginx/sites-available/paymenter.conf
 | 
			
		||||
    $STD systemctl reload nginx
 | 
			
		||||
    msg_ok "Migrated PHP $CURRENT_PHP to 8.3"
 | 
			
		||||
  fi
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
 | 
			
		||||
  if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/paymenter/paymenter/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
  if [[ ! -f ~/.paymenter ]] || [[ "${RELEASE}" != "$(cat ~/.paymenter)" ]]; then
 | 
			
		||||
    msg_info "Updating ${APP} to ${RELEASE}"
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
    cd /opt/paymenter
 | 
			
		||||
    $STD php artisan p:upgrade --no-interaction
 | 
			
		||||
    echo "${RELEASE}" >~/.paymenter
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at ${RELEASE}."
 | 
			
		||||
 
 | 
			
		||||
@@ -27,18 +27,26 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -s https://api.github.com/repos/pocketbase/pocketbase/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.pocketbase 2>/dev/null)" ]] || [[ ! -f ~/.pocketbase ]]; then
 | 
			
		||||
    msg_info "Stopping ${APP}"
 | 
			
		||||
    systemctl stop pocketbase
 | 
			
		||||
    msg_ok "Stopped ${APP}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP}"
 | 
			
		||||
    /opt/pocketbase/pocketbase update
 | 
			
		||||
    echo "${RELEASE}" > ~/.pocketbase
 | 
			
		||||
    msg_ok "Updated ${APP}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
    systemctl start pocketbase
 | 
			
		||||
    msg_ok "Started ${APP}"
 | 
			
		||||
  msg_ok "Updated Successfully"
 | 
			
		||||
    
 | 
			
		||||
    msg_ok "Update Successful"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -29,9 +29,10 @@ function update_script() {
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  [[ -f /opt/${APP}_version.txt ]] && mv /opt/${APP}_version.txt ~/.pocket-id
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/pocket-id/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
 | 
			
		||||
    if [[ "$(cat /opt/${APP}_version.txt)" < "1.0.0" ]]; then
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.pocket-id)" ]] || [[ ! -f ~/.pocket-id ]]; then
 | 
			
		||||
    if [[ "$(cat ~/.pocket-id)" < "1.0.0" ]]; then
 | 
			
		||||
      msg_info "Migrating ${APP} to v${RELEASE}"
 | 
			
		||||
      systemctl -q disable --now pocketid-backend pocketid-frontend caddy
 | 
			
		||||
      mv /etc/caddy/Caddyfile ~/Caddyfile.bak
 | 
			
		||||
@@ -58,19 +59,19 @@ function update_script() {
 | 
			
		||||
      mv /opt/data /opt/pocket-id
 | 
			
		||||
      msg_ok "Migration complete. The reverse proxy port has been changed to 1411."
 | 
			
		||||
    else
 | 
			
		||||
      msg_info "Updating $APP to v${RELEASE}"
 | 
			
		||||
      msg_info "Stopping ${APP}"
 | 
			
		||||
      systemctl stop pocketid
 | 
			
		||||
      msg_ok "Stopped ${APP}"
 | 
			
		||||
      cp /opt/pocket-id/.env /opt/env
 | 
			
		||||
    fi
 | 
			
		||||
    curl -fsSL "https://github.com/pocket-id/pocket-id/releases/download/v${RELEASE}/pocket-id-linux-amd64" -o /opt/pocket-id/pocket-id
 | 
			
		||||
    chmod u+x /opt/pocket-id/pocket-id
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id-linux-amd64"
 | 
			
		||||
    mv /opt/env /opt/pocket-id/.env
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting $APP"
 | 
			
		||||
    systemctl start pocketid
 | 
			
		||||
    msg_ok "Started $APP"
 | 
			
		||||
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
    msg_ok "Update Successful"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at ${RELEASE}"
 | 
			
		||||
 
 | 
			
		||||
@@ -27,22 +27,25 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/PrivateBin/PrivateBin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
			
		||||
  if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
			
		||||
    msg_info "Updating ${APP} to v${RELEASE}"
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
  if [[ ! -f ~/.privatebin ]] || [[ "${RELEASE}" != "$(cat ~/.privatebin)" ]]; then
 | 
			
		||||
    msg_info "Creating backup"
 | 
			
		||||
    cp -f /opt/privatebin/cfg/conf.php /tmp/privatebin_conf.bak
 | 
			
		||||
    curl -fsSL "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip")
 | 
			
		||||
    $STD unzip ${RELEASE}.zip
 | 
			
		||||
    msg_ok "Backup created"
 | 
			
		||||
 | 
			
		||||
    rm -rf /opt/privatebin/*
 | 
			
		||||
    mv PrivateBin-${RELEASE}/* /opt/privatebin/
 | 
			
		||||
    fetch_and_deploy_gh_release "privatebin" "PrivateBin/PrivateBin" "tarball"
 | 
			
		||||
 | 
			
		||||
    msg_info "Configuring ${APP}"
 | 
			
		||||
    mkdir -p /opt/privatebin/data
 | 
			
		||||
    mv /tmp/privatebin_conf.bak /opt/privatebin/cfg/conf.php
 | 
			
		||||
    chown -R www-data:www-data /opt/privatebin
 | 
			
		||||
    chmod -R 0755 /opt/privatebin/data
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
    rm -rf ${RELEASE}.zip PrivateBin-${RELEASE}
 | 
			
		||||
    chmod -R 0755 /opt/privatebin/data}
 | 
			
		||||
    systemctl reload nginx php8.2-fpm
 | 
			
		||||
    msg_ok "Updated ${APP} to v${RELEASE}"
 | 
			
		||||
    msg_ok "Configured ${APP}"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Successfully updated"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
 
 | 
			
		||||
@@ -27,24 +27,19 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/prometheus/alertmanager/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
  if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
			
		||||
  if [[ ! -f ~/.alertmanager ]] || [[ "${RELEASE}" != "$(cat ~/.alertmanager)" ]]; then
 | 
			
		||||
    msg_info "Stopping ${APP}"
 | 
			
		||||
    systemctl stop prometheus-alertmanager
 | 
			
		||||
    msg_ok "Stopped ${APP}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP} to v${RELEASE}"
 | 
			
		||||
    cd /opt
 | 
			
		||||
    curl -fsSL "https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-amd64.tar.gz" -o $(basename "https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-amd64.tar.gz")
 | 
			
		||||
    tar -xf alertmanager-${RELEASE}.linux-amd64.tar.gz
 | 
			
		||||
    cp -rf alertmanager-${RELEASE}.linux-amd64/alertmanager alertmanager-${RELEASE}.linux-amd64/amtool /usr/local/bin/
 | 
			
		||||
    rm -rf alertmanager-${RELEASE}.linux-amd64 alertmanager-${RELEASE}.linux-amd64.tar.gz
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
    msg_ok "Updated ${APP} to v${RELEASE}"
 | 
			
		||||
    fetch_and_deploy_gh_release "alertmanager" "prometheus/alertmanager" "prebuild" "latest" "/usr/local/bin/" "alertmanager*linux-amd64.tar.gz"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
    systemctl start prometheus-alertmanager
 | 
			
		||||
    msg_ok "Started ${APP}"
 | 
			
		||||
    
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								ct/pulse.sh
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								ct/pulse.sh
									
									
									
									
									
								
							@@ -23,40 +23,32 @@ function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
  if [[ -d /opt/pulse-monitor ]]; then
 | 
			
		||||
  msg_error "An old installation was detected. Please recreate the LXC from scratch (https://github.com/community-scripts/ProxmoxVE/pull/4848)"
 | 
			
		||||
  exit 1
 | 
			
		||||
  fi
 | 
			
		||||
  if [[ ! -d /opt/pulse ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
  if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
			
		||||
 | 
			
		||||
  if [[ ! -f ~/.pulse ]]; then
 | 
			
		||||
    msg_error "Old Installation Found! Please recreate the container due big changes in the software."
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/releases/latest | jq -r '.tag_name' | sed 's/^v//')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.pulse 2>/dev/null)" ]] || [[ ! -f ~/.pulse ]]; then
 | 
			
		||||
    msg_info "Stopping ${APP}"
 | 
			
		||||
    systemctl stop pulse
 | 
			
		||||
    msg_ok "Stopped ${APP}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating Pulse"
 | 
			
		||||
    temp_file=$(mktemp)
 | 
			
		||||
    mkdir -p /opt/pulse
 | 
			
		||||
    rm -rf /opt/pulse/*
 | 
			
		||||
    curl -fsSL "https://github.com/rcourtman/Pulse/releases/download/v${RELEASE}/pulse-v${RELEASE}.tar.gz" -o "$temp_file"
 | 
			
		||||
    tar zxf "$temp_file" --strip-components=1 -C /opt/pulse
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
    msg_ok "Updated Pulse to ${RELEASE}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Setting permissions for /opt/pulse..."
 | 
			
		||||
    chown -R pulse:pulse "/opt/pulse"
 | 
			
		||||
    find "/opt/pulse" -type d -exec chmod 755 {} \;
 | 
			
		||||
    find "/opt/pulse" -type f -exec chmod 644 {} \;
 | 
			
		||||
    msg_ok "Set permissions."
 | 
			
		||||
    fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
 | 
			
		||||
    chown -R pulse:pulse /etc/pulse /opt/pulse
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting ${APP}"
 | 
			
		||||
    systemctl start pulse
 | 
			
		||||
    msg_ok "Started ${APP}"
 | 
			
		||||
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at ${RELEASE}."
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -27,10 +27,11 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  sed -i 's/^\([[:space:]]*limiter:\)[[:space:]]*true/\1 false/' /etc/searxng/settings.yml
 | 
			
		||||
  if cd /usr/local/searxng/searxng-src && git pull | grep -q 'Already up to date'; then
 | 
			
		||||
  msg_ok "There is currently no update available."
 | 
			
		||||
  fi
 | 
			
		||||
  # sed -i 's/^\([[:space:]]*limiter:\)[[:space:]]*true/\1 false/' /etc/searxng/settings.yml
 | 
			
		||||
  # if cd /usr/local/searxng/searxng-src && git pull | grep -q 'Already up to date'; then
 | 
			
		||||
  #   msg_ok "There is currently no update available."
 | 
			
		||||
  # fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
start
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (Canbiz)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://tandoor.dev/
 | 
			
		||||
@@ -27,27 +27,57 @@ function update_script() {
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  #if ! [[ $(dpkg -s python3-xmlsec 2>/dev/null) ]]; then
 | 
			
		||||
    #$STD apt-get update
 | 
			
		||||
    #$STD apt-get install -y python3-xmlsec
 | 
			
		||||
  #fi
 | 
			
		||||
  #if cd /opt/tandoor && git pull | grep -q 'Already up to date'; then
 | 
			
		||||
    msg_ok "There is currently no update available."
 | 
			
		||||
  #else
 | 
			
		||||
    #msg_info "Updating ${APP} (Patience)"
 | 
			
		||||
    #export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
 | 
			
		||||
    #cd /opt/tandoor/
 | 
			
		||||
    #$STD pip3 install -r requirements.txt
 | 
			
		||||
    #$STD /usr/bin/python3 /opt/tandoor/manage.py migrate
 | 
			
		||||
    #$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input
 | 
			
		||||
    #$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse
 | 
			
		||||
    #cd /opt/tandoor/vue
 | 
			
		||||
    #$STD yarn install
 | 
			
		||||
    #$STD yarn build
 | 
			
		||||
    #cd /opt/tandoor
 | 
			
		||||
    #$STD python3 version.py
 | 
			
		||||
    #systemctl restart gunicorn_tandoor
 | 
			
		||||
    #msg_ok "Updated ${APP}"
 | 
			
		||||
 | 
			
		||||
  if [[ ! -f ~/.tandoor ]]; then
 | 
			
		||||
    msg_error "v1 Installation found, please export your data and create an new LXC."
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r '.tag_name' | sed 's/^v//')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.tandoor 2>/dev/null)" ]] || [[ ! -f ~/.tandoor ]]; then
 | 
			
		||||
    msg_info "Stopping $APP"
 | 
			
		||||
    systemctl stop tandoor
 | 
			
		||||
    msg_ok "Stopped $APP"
 | 
			
		||||
 | 
			
		||||
    msg_info "Creating Backup"
 | 
			
		||||
    mv /opt/tandoor /opt/tandoor.bak
 | 
			
		||||
    msg_ok "Backup Created"
 | 
			
		||||
 | 
			
		||||
    NODE_VERSION="20" NODE_MODULE="yarn" setup_nodejs
 | 
			
		||||
    PYTHON_VERSION="3.13" setup_uv
 | 
			
		||||
    fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating $APP to ${RELEASE}"
 | 
			
		||||
    cp -r /opt/tandoor.bak/{config,api,mediafiles,staticfiles} /opt/tandoor/
 | 
			
		||||
    mv /opt/.env /opt/tandoor/.env
 | 
			
		||||
    cd /opt/tandoor
 | 
			
		||||
    $STD uv venv .venv --python=python3
 | 
			
		||||
    $STD uv pip install -r requirements.txt --python .venv/bin/python
 | 
			
		||||
    cd /opt/tandoor/vue3
 | 
			
		||||
    $STD yarn install
 | 
			
		||||
    $STD yarn build
 | 
			
		||||
    TANDOOR_VERSION="$(curl -fsSL https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r .tag_name)"
 | 
			
		||||
    cat <<EOF >/opt/tandoor/cookbook/version_info.py
 | 
			
		||||
TANDOOR_VERSION = "$TANDOOR_VERSION"
 | 
			
		||||
TANDOOR_REF = "bare-metal"
 | 
			
		||||
VERSION_INFO = []
 | 
			
		||||
EOF
 | 
			
		||||
    cd /opt/tandoor
 | 
			
		||||
    $STD /opt/tandoor/.venv/bin/python manage.py migrate
 | 
			
		||||
    $STD /opt/tandoor/.venv/bin/python manage.py collectstatic --no-input
 | 
			
		||||
    msg_ok "Updated $APP to ${RELEASE}"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting $APP"
 | 
			
		||||
    systemctl start tandoor
 | 
			
		||||
    systemctl reload nginx
 | 
			
		||||
    msg_ok "Started $APP"
 | 
			
		||||
 | 
			
		||||
    msg_info "Cleaning Up"
 | 
			
		||||
    rm -rf /opt/tandoor.bak
 | 
			
		||||
    msg_ok "Cleanup Completed"
 | 
			
		||||
    msg_ok "Update Successful"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "No update required. ${APP} is already at v${RELEASE}"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										72
									
								
								ct/tududi.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								ct/tududi.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,72 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: vhsdream
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://tududi.com
 | 
			
		||||
 | 
			
		||||
APP="Tududi"
 | 
			
		||||
var_tags="${var_tags:-todo-app}"
 | 
			
		||||
var_cpu="${var_cpu:-2}"
 | 
			
		||||
var_ram="${var_ram:-2048}"
 | 
			
		||||
var_disk="${var_disk:-4}"
 | 
			
		||||
var_os="${var_os:-debian}"
 | 
			
		||||
var_version="${var_version:-12}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
  if [[ ! -d /opt/tududi ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/chrisvel/tududi/releases/latest | yq '.tag_name' | sed 's/^v//')
 | 
			
		||||
  if [[ "${RELEASE}" != "$(cat ~/.tududi 2>/dev/null)" ]] || [[ ! -f ~/.tududi ]]; then
 | 
			
		||||
    msg_info "Stopping Service"
 | 
			
		||||
    systemctl stop tududi
 | 
			
		||||
    msg_ok "Stopped Service"
 | 
			
		||||
 | 
			
		||||
    msg_info "Remove and backup Files"
 | 
			
		||||
    cp /opt/tududi/backend/.env /opt/tududi.env
 | 
			
		||||
    rm -rf /opt/tududi/backend/dist
 | 
			
		||||
    msg_ok "Backup and removed Files"
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "tududi" "chrisvel/tududi"
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP}"
 | 
			
		||||
    cd /opt/tududi
 | 
			
		||||
    $STD npm install
 | 
			
		||||
    export NODE_ENV=production
 | 
			
		||||
    $STD npm run frontend:build
 | 
			
		||||
    mv ./dist ./backend
 | 
			
		||||
    mv ./public/locales ./backend/dist
 | 
			
		||||
    mv ./public/favicon.* ./backend/dist
 | 
			
		||||
    mv /opt/tududi.env /opt/tududi/.env
 | 
			
		||||
    msg_ok "Updated $APP"
 | 
			
		||||
 | 
			
		||||
    msg_info "Starting Service"
 | 
			
		||||
    systemctl start tududi
 | 
			
		||||
    msg_ok "Started Service"
 | 
			
		||||
    msg_ok "Updated Successfully"
 | 
			
		||||
  else
 | 
			
		||||
    msg_ok "Already up to date"
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3002${CL}"
 | 
			
		||||
@@ -35,8 +35,15 @@ function update_script() {
 | 
			
		||||
    [[ -f /etc/systemd/system/victoriametrics-logs.service ]] && systemctl stop victoriametrics-logs
 | 
			
		||||
    msg_ok "Stopped $APP"
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "victoriametrics" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "victoria-metrics-linux-amd64-v+([0-9.]).tar.gz"
 | 
			
		||||
    fetch_and_deploy_gh_release "vmutils" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "vmutils-linux-amd64-v+([0-9.]).tar.gz"
 | 
			
		||||
    victoriametrics_filename=$(curl -fsSL "https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest" |
 | 
			
		||||
      jq -r '.assets[].name' |
 | 
			
		||||
      grep -E '^victoria-metrics-linux-amd64-v[0-9.]+\.tar\.gz$')
 | 
			
		||||
    vmutils_filename=$(curl -fsSL "https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest" |
 | 
			
		||||
      jq -r '.assets[].name' |
 | 
			
		||||
      grep -E '^vmutils-linux-amd64-v[0-9.]+\.tar\.gz$')
 | 
			
		||||
 | 
			
		||||
    fetch_and_deploy_gh_release "victoriametrics" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "$victoriametrics_filename"
 | 
			
		||||
    fetch_and_deploy_gh_release "vmutils" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "$vmutils_filename"
 | 
			
		||||
 | 
			
		||||
    if [[ -f /etc/systemd/system/victoriametrics-logs.service ]]; then
 | 
			
		||||
      fetch_and_deploy_gh_release "victorialogs" "VictoriaMetrics/VictoriaLogs" "prebuild" "latest" "/opt/victoriametrics" "victoria-logs-linux-amd64*.tar.gz"
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,7 @@ var_disk="${var_disk:-4}"
 | 
			
		||||
var_os="${var_os:-debian}"
 | 
			
		||||
var_version="${var_version:-12}"
 | 
			
		||||
var_unprivileged="${var_unprivileged:-1}"
 | 
			
		||||
var_tun="${var_tun:-1}"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 80,
 | 
			
		||||
  "documentation": null,
 | 
			
		||||
  "website": "https://it-tools.tech/",
 | 
			
		||||
  "website": "https://sharevb-it-tools.vercel.app/",
 | 
			
		||||
  "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/it-tools.webp",
 | 
			
		||||
  "config_path": "",
 | 
			
		||||
  "description": "IT-Tools is a web-based suite of utilities designed to streamline and simplify various IT tasks, providing tools for developers and system administrators to manage their workflows efficiently.",
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2024-05-02",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": false,
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 6767,
 | 
			
		||||
  "documentation": "https://wiki.bazarr.media/",
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2024-05-02",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": false,
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": null,
 | 
			
		||||
  "documentation": null,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,52 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "Home Assistant Core",
 | 
			
		||||
    "slug": "homeassistant-core",
 | 
			
		||||
    "categories": [
 | 
			
		||||
        16
 | 
			
		||||
    ],
 | 
			
		||||
    "date_created": "2025-01-17",
 | 
			
		||||
    "type": "ct",
 | 
			
		||||
    "updateable": true,
 | 
			
		||||
    "privileged": false,
 | 
			
		||||
    "interface_port": 8123,
 | 
			
		||||
    "documentation": "https://www.home-assistant.io/docs/",
 | 
			
		||||
    "website": "https://www.home-assistant.io/",
 | 
			
		||||
    "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/home-assistant.webp",
 | 
			
		||||
    "config_path": "/root/.homeassistant",
 | 
			
		||||
    "description": "A standalone installation of Home Assistant Core refers to a setup where the Home Assistant Core software is installed directly on a device or operating system, without the use of Docker containers. This provides a simpler, but less flexible and scalable solution, as the software is tightly coupled with the underlying system.",
 | 
			
		||||
    "install_methods": [
 | 
			
		||||
        {
 | 
			
		||||
            "type": "default",
 | 
			
		||||
            "script": "ct/homeassistant-core.sh",
 | 
			
		||||
            "resources": {
 | 
			
		||||
                "cpu": 2,
 | 
			
		||||
                "ram": 2048,
 | 
			
		||||
                "hdd": 10,
 | 
			
		||||
                "os": "ubuntu",
 | 
			
		||||
                "version": "24.10"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "default_credentials": {
 | 
			
		||||
        "username": null,
 | 
			
		||||
        "password": null
 | 
			
		||||
    },
 | 
			
		||||
    "notes": [
 | 
			
		||||
        {
 | 
			
		||||
            "text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
 | 
			
		||||
            "type": "warning"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "text": "Requires PVE 8.2.2 with kernel 6.8.4-3-pve or newer",
 | 
			
		||||
            "type": "warning"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "text": "Deprecation-Warning: This Core-based setup will be deprecated by August 2025. Use Home Assistant OS is strongly recommended to ensure long-term stability and updates.",
 | 
			
		||||
            "type": "warning"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "text": "config path: `/root/.homeassistant`",
 | 
			
		||||
            "type": "info"
 | 
			
		||||
        }
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										40
									
								
								frontend/public/json/hortusfox.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								frontend/public/json/hortusfox.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "HortusFox",
 | 
			
		||||
  "slug": "hortusfox",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    24
 | 
			
		||||
  ],
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "date_created": "2025-08-08",
 | 
			
		||||
  "config_path": "/opt/hortusfox/.env",
 | 
			
		||||
  "interface_port": 80,
 | 
			
		||||
  "documentation": "https://github.com/danielbrendel/hortusfox-web",
 | 
			
		||||
  "website": "https://www.hortusfox.com/",
 | 
			
		||||
  "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/hortusfox.webp",
 | 
			
		||||
  "description": "HortusFox is a collaborative plant management system for plant enthusiasts. Manage, document and track your entire plant collection – self-hosted and privacy-friendly.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/hortusfox.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 2,
 | 
			
		||||
        "ram": 2048,
 | 
			
		||||
        "hdd": 5,
 | 
			
		||||
        "os": "Debian",
 | 
			
		||||
        "version": "12"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "text": "Login Credentials : `cat ~/hortusfox.creds`",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										40
									
								
								frontend/public/json/ots.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								frontend/public/json/ots.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "OTS",
 | 
			
		||||
  "slug": "ots",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    6
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2025-08-04",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 443,
 | 
			
		||||
  "documentation": "https://github.com/Luzifer/ots/wiki",
 | 
			
		||||
  "config_path": "/opt/ots/.env",
 | 
			
		||||
  "website": "https://github.com/Luzifer/ots",
 | 
			
		||||
  "logo": null,
 | 
			
		||||
  "description": "One-Time-Secret sharing platform with a symmetric 256bit AES encryption in the browser.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/ots.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 1,
 | 
			
		||||
        "ram": 512,
 | 
			
		||||
        "hdd": 3,
 | 
			
		||||
        "os": "Debian",
 | 
			
		||||
        "version": "12"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "text": "When it is in used external please use it behind reverse proxy or create your own certificates",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2024-05-02",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": false,
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 3000,
 | 
			
		||||
  "documentation": "https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md",
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										44
									
								
								frontend/public/json/palmr.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								frontend/public/json/palmr.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "Palmr",
 | 
			
		||||
  "slug": "palmr",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    11
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2025-08-08",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 3000,
 | 
			
		||||
  "documentation": "https://palmr.kyantech.com.br/docs/3.1-beta",
 | 
			
		||||
  "config_path": "/opt/palmr/apps/server/.env, /opt/palmr/apps/web/.env",
 | 
			
		||||
  "website": "https://palmr.kyantech.com.br/",
 | 
			
		||||
  "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/palmr.webp",
 | 
			
		||||
  "description": "Palmr is a fast and secure platform for sharing files, built with performance and privacy in mind.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/palmr.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 4,
 | 
			
		||||
        "ram": 4096,
 | 
			
		||||
        "hdd": 6,
 | 
			
		||||
        "os": "Debian",
 | 
			
		||||
        "version": "12"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "text": "To use a bind mount for storage, create symlinks to your mount for both `uploads` and `temp-uploads` in `/opt/palmr_data`",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "text": "To use Palmr with a reverse proxy, uncomment `SECURE_SITE` in `/opt/palmr/apps/server/.env`",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "SearXNG",
 | 
			
		||||
  "slug": "searxng",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    0
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2025-02-07",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 8888,
 | 
			
		||||
  "documentation": "https://docs.searxng.org/",
 | 
			
		||||
  "website": "https://github.com/searxng/searxng",
 | 
			
		||||
  "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/searxng.webp",
 | 
			
		||||
  "config_path": "/etc/searxng/settings.yml",
 | 
			
		||||
  "description": "SearXNG is a free internet metasearch engine which aggregates results from up to 215 search services. Users are neither tracked nor profiled. Additionally, SearXNG can be used over Tor for online anonymity.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/searxng.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 2,
 | 
			
		||||
        "ram": 2048,
 | 
			
		||||
        "hdd": 7,
 | 
			
		||||
        "os": "debian",
 | 
			
		||||
        "version": "12"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": []
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										44
									
								
								frontend/public/json/tududi.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								frontend/public/json/tududi.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "Tududi",
 | 
			
		||||
  "slug": "tududi",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    12
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2025-08-04",
 | 
			
		||||
  "type": "ct",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": 3002,
 | 
			
		||||
  "documentation": null,
 | 
			
		||||
  "config_path": "/opt/tududi/backend/.env",
 | 
			
		||||
  "website": "https://tududi.com/",
 | 
			
		||||
  "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tududi.webp",
 | 
			
		||||
  "description": "Self-hosted task management with functional programming architecture, hierarchical organization, and multi-language support.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "ct/tududi.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 2,
 | 
			
		||||
        "ram": 2048,
 | 
			
		||||
        "hdd": 4,
 | 
			
		||||
        "os": "Debian",
 | 
			
		||||
        "version": "12"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "text": "Create users like this: `cd /opt/tududi` => `npm run user:create <email> <password>`",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "text": "Database location: `/opt/tududi-db`. Uploads: `/opt/tududi-uploads`",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
@@ -1,40 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "Ubuntu 24.10",
 | 
			
		||||
  "slug": "ubuntu2410-vm",
 | 
			
		||||
  "categories": [
 | 
			
		||||
    2
 | 
			
		||||
  ],
 | 
			
		||||
  "date_created": "2025-01-24",
 | 
			
		||||
  "type": "vm",
 | 
			
		||||
  "updateable": true,
 | 
			
		||||
  "privileged": false,
 | 
			
		||||
  "interface_port": null,
 | 
			
		||||
  "documentation": null,
 | 
			
		||||
  "website": "https://ubuntu.com/",
 | 
			
		||||
  "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/ubuntu.webp",
 | 
			
		||||
  "config_path": "",
 | 
			
		||||
  "description": "Ubuntu is a distribution based on Debian, designed to have regular releases and a consistent user experience.",
 | 
			
		||||
  "install_methods": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "default",
 | 
			
		||||
      "script": "vm/ubuntu2410-vm.sh",
 | 
			
		||||
      "resources": {
 | 
			
		||||
        "cpu": 2,
 | 
			
		||||
        "ram": 2048,
 | 
			
		||||
        "hdd": 8,
 | 
			
		||||
        "os": null,
 | 
			
		||||
        "version": null
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "default_credentials": {
 | 
			
		||||
    "username": null,
 | 
			
		||||
    "password": null
 | 
			
		||||
  },
 | 
			
		||||
  "notes": [
 | 
			
		||||
    {
 | 
			
		||||
      "text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´",
 | 
			
		||||
      "type": "info"
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -14,17 +14,17 @@ network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apk add nginx
 | 
			
		||||
$STD apk add --no-cache \
 | 
			
		||||
  nginx \
 | 
			
		||||
  python3
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing IT-Tools"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
 | 
			
		||||
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
 | 
			
		||||
 | 
			
		||||
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/sharevb/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
 | 
			
		||||
curl -fsSL "https://github.com/sharevb/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" -o it-tools.zip
 | 
			
		||||
mkdir -p /usr/share/nginx/html
 | 
			
		||||
$STD unzip it-tools.zip -d /tmp/it-tools
 | 
			
		||||
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
 | 
			
		||||
$STD unzip it-tools.zip -d /tmp/
 | 
			
		||||
mv /tmp/dist/* /usr/share/nginx/html
 | 
			
		||||
cat <<'EOF' >/etc/nginx/http.d/default.conf
 | 
			
		||||
server {
 | 
			
		||||
  listen 80;
 | 
			
		||||
@@ -39,14 +39,14 @@ server {
 | 
			
		||||
EOF
 | 
			
		||||
$STD rc-update add nginx default
 | 
			
		||||
$STD rc-service nginx start
 | 
			
		||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
			
		||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
 | 
			
		||||
msg_ok "Installed IT-Tools"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -rf /tmp/it-tools
 | 
			
		||||
rm -rf /tmp/dist
 | 
			
		||||
rm -f it-tools.zip
 | 
			
		||||
$STD apk cache clean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 
 | 
			
		||||
@@ -27,16 +27,16 @@ msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Python Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  python3-pip \
 | 
			
		||||
  python3-ldap \
 | 
			
		||||
  python3-msgpack \
 | 
			
		||||
  python3-regex
 | 
			
		||||
msg_ok "Installed Python Dependencies"
 | 
			
		||||
 | 
			
		||||
NODE_VERSION="22" setup_nodejs
 | 
			
		||||
PYTHON_VERSION="3.13" setup_uv
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Playwright"
 | 
			
		||||
$STD pip install playwright
 | 
			
		||||
$STD uv pip install playwright --system
 | 
			
		||||
$STD playwright install-deps chromium
 | 
			
		||||
msg_ok "Installed Playwright"
 | 
			
		||||
 | 
			
		||||
@@ -45,7 +45,7 @@ mkdir -p /opt/archivebox/{data,.npm,.cache,.local}
 | 
			
		||||
$STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password --home /home/archivebox archivebox
 | 
			
		||||
chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local}
 | 
			
		||||
chmod -R 755 /opt/archivebox/data
 | 
			
		||||
$STD pip install archivebox
 | 
			
		||||
$STD uv pip install archivebox --system
 | 
			
		||||
cd /opt/archivebox/data
 | 
			
		||||
expect <<EOF
 | 
			
		||||
set timeout -1
 | 
			
		||||
 
 | 
			
		||||
@@ -16,17 +16,16 @@ update_os
 | 
			
		||||
msg_info "Setup Python3"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  python3 \
 | 
			
		||||
  python3-dev \
 | 
			
		||||
  python3-pip
 | 
			
		||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
 | 
			
		||||
  python3-dev
 | 
			
		||||
msg_ok "Setup Python3"
 | 
			
		||||
 | 
			
		||||
PYTHON_VERSION="3.13" setup_uv
 | 
			
		||||
fetch_and_deploy_gh_release "bazarr" "morpheus65535/bazarr" "prebuild" "latest" "/opt/bazarr" "bazarr.zip"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Bazarr"
 | 
			
		||||
mkdir -p /var/lib/bazarr/
 | 
			
		||||
curl -fsSL "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip" -o "bazarr.zip"
 | 
			
		||||
$STD unzip bazarr -d /opt/bazarr
 | 
			
		||||
chmod 775 /opt/bazarr /var/lib/bazarr/
 | 
			
		||||
$STD python3 -m pip install -q -r /opt/bazarr/requirements.txt
 | 
			
		||||
$STD uv pip install -r /opt/bazarr/requirements.txt --system
 | 
			
		||||
msg_ok "Installed Bazarr"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
@@ -56,7 +55,6 @@ motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -rf bazarr.zip
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 
 | 
			
		||||
@@ -51,7 +51,6 @@ sed -i -e "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z
 | 
			
		||||
  /opt/docmost/.env
 | 
			
		||||
export NODE_OPTIONS="--max-old-space-size=2048"
 | 
			
		||||
$STD pnpm install
 | 
			
		||||
$STD pnpm nx run server:build # Dirty fix https://github.com/community-scripts/ProxmoxVE/issues/6377
 | 
			
		||||
$STD pnpm build
 | 
			
		||||
msg_ok "Configured Docmost"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,105 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://www.home-assistant.io/
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies (Patience)"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  git \
 | 
			
		||||
  ca-certificates \
 | 
			
		||||
  bluez \
 | 
			
		||||
  libtiff6 \
 | 
			
		||||
  tzdata \
 | 
			
		||||
  libffi-dev \
 | 
			
		||||
  libssl-dev \
 | 
			
		||||
  libjpeg-dev \
 | 
			
		||||
  zlib1g-dev \
 | 
			
		||||
  autoconf \
 | 
			
		||||
  build-essential \
 | 
			
		||||
  libopenjp2-7 \
 | 
			
		||||
  libturbojpeg0-dev \
 | 
			
		||||
  ffmpeg \
 | 
			
		||||
  liblapack3 \
 | 
			
		||||
  liblapack-dev \
 | 
			
		||||
  dbus-broker \
 | 
			
		||||
  libpcap-dev \
 | 
			
		||||
  libavdevice-dev \
 | 
			
		||||
  libavformat-dev \
 | 
			
		||||
  libavcodec-dev \
 | 
			
		||||
  libavutil-dev \
 | 
			
		||||
  libavfilter-dev \
 | 
			
		||||
  libmariadb-dev-compat \
 | 
			
		||||
  libatlas-base-dev \
 | 
			
		||||
  software-properties-common \
 | 
			
		||||
  libmariadb-dev \
 | 
			
		||||
  pkg-config
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
setup_uv
 | 
			
		||||
msg_info "Setup Python3"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  python3.13 \
 | 
			
		||||
  python3.13-dev \
 | 
			
		||||
  python3.13-venv
 | 
			
		||||
msg_ok "Setup Python3"
 | 
			
		||||
 | 
			
		||||
msg_info "Preparing Python 3.13 for uv"
 | 
			
		||||
$STD uv python install 3.13
 | 
			
		||||
UV_PYTHON=$(uv python list | awk '/3\.13\.[0-9]+.*\/root\/.local/ {print $2; exit}')
 | 
			
		||||
if [[ -z "$UV_PYTHON" ]]; then
 | 
			
		||||
  msg_error "No local Python 3.13 found via uv"
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
msg_ok "Prepared Python 3.13"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up Home Assistant-Core environment"
 | 
			
		||||
rm -rf /srv/homeassistant
 | 
			
		||||
mkdir -p /srv/homeassistant
 | 
			
		||||
cd /srv/homeassistant
 | 
			
		||||
$STD uv venv .venv --python "$UV_PYTHON"
 | 
			
		||||
source .venv/bin/activate
 | 
			
		||||
msg_ok "Created virtual environment"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Home Assistant-Core"
 | 
			
		||||
$STD uv pip install homeassistant mysqlclient psycopg2-binary isal webrtcvad wheel
 | 
			
		||||
mkdir -p /root/.homeassistant
 | 
			
		||||
msg_ok "Installed Home Assistant-Core"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/homeassistant.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Home Assistant
 | 
			
		||||
After=network-online.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
WorkingDirectory=/root/.homeassistant
 | 
			
		||||
Environment="PATH=/srv/homeassistant/.venv/bin:/usr/local/bin:/usr/bin"
 | 
			
		||||
ExecStart=/srv/homeassistant/.venv/bin/python3 -m homeassistant --config /root/.homeassistant
 | 
			
		||||
Restart=always
 | 
			
		||||
RestartForceExitStatus=100
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
systemctl enable -q --now homeassistant
 | 
			
		||||
msg_ok "Created Service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
							
								
								
									
										103
									
								
								install/hortusfox-install.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								install/hortusfox-install.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,103 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://github.com/danielbrendel/hortusfox-web
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y apache2
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
PHP_MODULE="exif,mysql" PHP_APACHE="YES" PHP_FPM="NO" PHP_VERSION="8.3" setup_php
 | 
			
		||||
setup_mariadb
 | 
			
		||||
setup_composer
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up database"
 | 
			
		||||
DB_NAME=hortusfox
 | 
			
		||||
DB_USER=hortusfox
 | 
			
		||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
 | 
			
		||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
 | 
			
		||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
 | 
			
		||||
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
 | 
			
		||||
{
 | 
			
		||||
  echo "HortusFox Database Credentials"
 | 
			
		||||
  echo "Database: $DB_NAME"
 | 
			
		||||
  echo "Username: $DB_USER"
 | 
			
		||||
  echo "Password: $DB_PASS"
 | 
			
		||||
} >>~/hortusfox.creds
 | 
			
		||||
msg_ok "Set up database"
 | 
			
		||||
 | 
			
		||||
fetch_and_deploy_gh_release "hortusfox" "danielbrendel/hortusfox-web"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring .env"
 | 
			
		||||
cp /opt/hortusfox/.env.example /opt/hortusfox/.env
 | 
			
		||||
sed -i "s|^DB_HOST=.*|DB_HOST=localhost|" /opt/hortusfox/.env
 | 
			
		||||
sed -i "s|^DB_USER=.*|DB_USER=$DB_USER|" /opt/hortusfox/.env
 | 
			
		||||
sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" /opt/hortusfox/.env
 | 
			
		||||
sed -i "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" /opt/hortusfox/.env
 | 
			
		||||
sed -i "s|^DB_ENABLE=.*|DB_ENABLE=true|" /opt/hortusfox/.env
 | 
			
		||||
sed -i "s|^APP_TIMEZONE=.*|APP_TIMEZONE=Europe/Berlin|" /opt/hortusfox/.env
 | 
			
		||||
msg_ok ".env configured"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Composer dependencies"
 | 
			
		||||
cd /opt/hortusfox
 | 
			
		||||
$STD composer install --no-dev --optimize-autoloader
 | 
			
		||||
msg_ok "Composer dependencies installed"
 | 
			
		||||
 | 
			
		||||
msg_info "Running DB migration"
 | 
			
		||||
$STD php asatru migrate:fresh
 | 
			
		||||
msg_ok "Migration finished"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up HortusFox"
 | 
			
		||||
$STD mariadb -u root -D $DB_NAME -e "INSERT IGNORE INTO AppModel (workspace, language, created_at) VALUES ('Default Workspace', 'en', NOW());"
 | 
			
		||||
$STD php asatru plants:attributes
 | 
			
		||||
$STD php asatru calendar:classes
 | 
			
		||||
ADMIN_EMAIL="admin@example.com"
 | 
			
		||||
ADMIN_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)"
 | 
			
		||||
ADMIN_HASH=$(php -r "echo password_hash('$ADMIN_PASS', PASSWORD_BCRYPT);")
 | 
			
		||||
$STD mariadb -u root -D $DB_NAME -e "INSERT IGNORE INTO UserModel (name, email, password, admin) VALUES ('Admin', '$ADMIN_EMAIL', '$ADMIN_HASH', 1);"
 | 
			
		||||
{
 | 
			
		||||
  echo ""
 | 
			
		||||
  echo "HortusFox-Admin-Creds:"
 | 
			
		||||
  echo "E-Mail: $ADMIN_EMAIL"
 | 
			
		||||
  echo "Passwort: $ADMIN_PASS"
 | 
			
		||||
} >>~/hortusfox.creds
 | 
			
		||||
$STD mariadb -u root -D $DB_NAME -e "INSERT IGNORE INTO LocationsModel (name, active, created_at) VALUES ('Home', 1, NOW());"
 | 
			
		||||
msg_ok "Set up HortusFox"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring Apache vHost"
 | 
			
		||||
cat <<EOF >/etc/apache2/sites-available/hortusfox.conf
 | 
			
		||||
<VirtualHost *:80>
 | 
			
		||||
    ServerAdmin webmaster@localhost
 | 
			
		||||
    DocumentRoot /opt/hortusfox/public
 | 
			
		||||
    <Directory /opt/hortusfox/public>
 | 
			
		||||
        Options Indexes FollowSymLinks
 | 
			
		||||
        AllowOverride All
 | 
			
		||||
        Require all granted
 | 
			
		||||
    </Directory>
 | 
			
		||||
    ErrorLog \${APACHE_LOG_DIR}/hortusfox_error.log
 | 
			
		||||
    CustomLog \${APACHE_LOG_DIR}/hortusfox_access.log combined
 | 
			
		||||
</VirtualHost>
 | 
			
		||||
EOF
 | 
			
		||||
$STD a2dissite 000-default
 | 
			
		||||
$STD a2ensite hortusfox
 | 
			
		||||
$STD a2enmod rewrite
 | 
			
		||||
systemctl restart apache2
 | 
			
		||||
msg_ok "Apache configured"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
@@ -254,8 +254,7 @@ $STD make clean
 | 
			
		||||
cd "$STAGING_DIR"
 | 
			
		||||
 | 
			
		||||
SOURCE=$SOURCE_DIR/libvips
 | 
			
		||||
# : "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}"
 | 
			
		||||
: "${LIBVIPS_REVISION:=8fa37a64547e392d3808eed8d72adab7e02b3d00}"
 | 
			
		||||
: "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}"
 | 
			
		||||
$STD git clone https://github.com/libvips/libvips.git "$SOURCE"
 | 
			
		||||
cd "$SOURCE"
 | 
			
		||||
$STD git reset --hard "$LIBVIPS_REVISION"
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ cat <<EOF >/etc/karakeep/karakeep.env
 | 
			
		||||
SERVER_VERSION="$(cat ~/.karakeep)"
 | 
			
		||||
NEXTAUTH_SECRET="$karakeep_SECRET"
 | 
			
		||||
NEXTAUTH_URL="http://localhost:3000"
 | 
			
		||||
DATA_DIR="$DATA_DIR"
 | 
			
		||||
DATA_DIR=${DATA_DIR}
 | 
			
		||||
MEILI_ADDR="http://127.0.0.1:7700"
 | 
			
		||||
MEILI_MASTER_KEY="$MASTER_KEY"
 | 
			
		||||
BROWSER_WEB_URL="http://127.0.0.1:9222"
 | 
			
		||||
 
 | 
			
		||||
@@ -13,25 +13,18 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Setup Python 3"
 | 
			
		||||
$STD apt-get install python3-pip -y
 | 
			
		||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
 | 
			
		||||
msg_ok "Setup Python 3"
 | 
			
		||||
PYTHON_VERSION="3.12" setup_uv
 | 
			
		||||
$STD uv python update-shell
 | 
			
		||||
fetch_and_deploy_gh_release "kometa" "Kometa-Team/Kometa"
 | 
			
		||||
 | 
			
		||||
msg_info "Setup Kometa"
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
curl -fsSL "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -o """$temp_file"""
 | 
			
		||||
tar -xzf "$temp_file"
 | 
			
		||||
mv Kometa-"${RELEASE}" /opt/kometa
 | 
			
		||||
cd /opt/kometa
 | 
			
		||||
$STD pip install -r requirements.txt --ignore-installed
 | 
			
		||||
$STD uv pip install -r requirements.txt --system
 | 
			
		||||
mkdir -p config/assets
 | 
			
		||||
cp config/config.yml.template config/config.yml
 | 
			
		||||
echo "${RELEASE}" >/opt/kometa_version.txt
 | 
			
		||||
msg_ok "Setup Kometa"
 | 
			
		||||
 | 
			
		||||
read -p "${TAB3}nter your TMDb API key: " TMDBKEY
 | 
			
		||||
read -p "${TAB3}Enter your TMDb API key: " TMDBKEY
 | 
			
		||||
read -p "${TAB3}Enter your Plex URL: " PLEXURL
 | 
			
		||||
read -p "${TAB3}Enter your Plex token: " PLEXTOKEN
 | 
			
		||||
sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL #g" /opt/kometa/config/config.yml
 | 
			
		||||
@@ -54,14 +47,13 @@ RestartSec=30
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
systemctl enable --now -q kometa
 | 
			
		||||
systemctl enable -q --now kometa
 | 
			
		||||
msg_ok "Created Service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
JAVA_VERSION="21" setup_java
 | 
			
		||||
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "komga" "gotson/komga" "singlefile" "latest" "/opt/komga" "komga*.jar"
 | 
			
		||||
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "komga-org" "gotson/komga" "singlefile" "latest" "/opt/komga" "komga*.jar"
 | 
			
		||||
mv /opt/komga/komga-*.jar /opt/komga/komga.jar
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,6 @@ update_os
 | 
			
		||||
fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring ${APPLICATION}"
 | 
			
		||||
cd /opt/meilisearch
 | 
			
		||||
curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml
 | 
			
		||||
MASTER_KEY=$(openssl rand -base64 12)
 | 
			
		||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
 | 
			
		||||
 
 | 
			
		||||
@@ -13,15 +13,10 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing NocoDB"
 | 
			
		||||
mkdir -p /opt/nocodb
 | 
			
		||||
cd /opt/nocodb
 | 
			
		||||
curl -fsSL http://get.nocodb.com/linux-x64 -o nocodb -L
 | 
			
		||||
chmod +x nocodb
 | 
			
		||||
msg_ok "Installed NocoDB"
 | 
			
		||||
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
service_path="/etc/systemd/system/nocodb.service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/nocodb.service
 | 
			
		||||
echo "[Unit]
 | 
			
		||||
Description=nocodb
 | 
			
		||||
 | 
			
		||||
@@ -33,7 +28,8 @@ WorkingDirectory=/opt/nocodb
 | 
			
		||||
ExecStart=/opt/nocodb/./nocodb
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target" >$service_path
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
systemctl enable -q --now nocodb
 | 
			
		||||
msg_ok "Created Service"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,12 +19,7 @@ $STD apt-get install -y \
 | 
			
		||||
  apt-transport-https
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Azul Zulu17"
 | 
			
		||||
curl -fsSL https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg
 | 
			
		||||
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" >/etc/apt/sources.list.d/zulu.list
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
$STD apt-get -y install zulu17-jdk
 | 
			
		||||
msg_ok "Installed Azul Zulu17"
 | 
			
		||||
JAVA_VERSION="21" setup_java
 | 
			
		||||
 | 
			
		||||
msg_info "Installing openHAB"
 | 
			
		||||
curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor -o /usr/share/keyrings/openhab.gpg
 | 
			
		||||
 
 | 
			
		||||
@@ -19,21 +19,7 @@ $STD apt-get install -y \
 | 
			
		||||
  ca-certificates
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up OpenProject Repository"
 | 
			
		||||
curl -fsSL "https://dl.packager.io/srv/opf/openproject/key" | gpg --dearmor >/etc/apt/trusted.gpg.d/packager-io.gpg
 | 
			
		||||
curl -fsSL "https://dl.packager.io/srv/opf/openproject/stable/15/installer/debian/12.repo" -o "/etc/apt/sources.list.d/openproject.list"
 | 
			
		||||
msg_ok "Setup OpenProject Repository"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up PostgreSQL Repository"
 | 
			
		||||
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
 | 
			
		||||
echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
 | 
			
		||||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg
 | 
			
		||||
msg_ok "Setup PostgreSQL Repository"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing PostgreSQL"
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
$STD apt-get install -y postgresql
 | 
			
		||||
msg_ok "Installed PostgreSQL"
 | 
			
		||||
PG_VERSION="17" setup_postgresql
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up PostgreSQL"
 | 
			
		||||
DB_NAME=openproject
 | 
			
		||||
@@ -51,6 +37,12 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP
 | 
			
		||||
} >>~/openproject.creds
 | 
			
		||||
msg_ok "Set up PostgreSQL"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up OpenProject Repository"
 | 
			
		||||
curl -fsSL "https://dl.packager.io/srv/opf/openproject/key" | gpg --dearmor >/etc/apt/trusted.gpg.d/packager-io.gpg
 | 
			
		||||
curl -fsSL "https://dl.packager.io/srv/opf/openproject/stable/15/installer/debian/12.repo" -o "/etc/apt/sources.list.d/openproject.list"
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
msg_ok "Setup OpenProject Repository"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing OpenProject"
 | 
			
		||||
$STD apt-get install -y openproject
 | 
			
		||||
msg_ok "Installed OpenProject"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										103
									
								
								install/ots-install.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								install/ots-install.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,103 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: bvberg01
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://github.com/Luzifer/ots
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
    redis-server \
 | 
			
		||||
    nginx \
 | 
			
		||||
    openssl
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
fetch_and_deploy_gh_release "ots" "Luzifer/ots" "prebuild" "latest" "/opt/ots" "ots_linux_amd64.tgz"
 | 
			
		||||
 | 
			
		||||
msg_info "Setup OTS"
 | 
			
		||||
cat <<EOF >/opt/ots/.env
 | 
			
		||||
LISTEN=127.0.0.1:3000
 | 
			
		||||
REDIS_URL=redis://127.0.0.1:6379
 | 
			
		||||
SECRET_EXPIRY=604800
 | 
			
		||||
STORAGE_TYPE=redis
 | 
			
		||||
EOF
 | 
			
		||||
msg_ok "Setup OTS"
 | 
			
		||||
 | 
			
		||||
msg_info "Generating Universal SSL Certificate"
 | 
			
		||||
mkdir -p /etc/ssl/ots
 | 
			
		||||
$STD openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
 | 
			
		||||
    -keyout /etc/ssl/ots/key.pem \
 | 
			
		||||
    -out /etc/ssl/ots/cert.pem \
 | 
			
		||||
    -subj "/CN=ots"
 | 
			
		||||
msg_ok "Certificate Generated"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up nginx"
 | 
			
		||||
cat <<EOF >/etc/nginx/sites-available/ots.conf
 | 
			
		||||
server {
 | 
			
		||||
    listen 80;
 | 
			
		||||
    listen [::]:80;
 | 
			
		||||
    server_name ots;
 | 
			
		||||
    return 301 https://\$host\$request_uri;
 | 
			
		||||
}
 | 
			
		||||
server {
 | 
			
		||||
  listen 443 ssl;
 | 
			
		||||
  listen [::]:443 ssl;
 | 
			
		||||
  server_name ots;
 | 
			
		||||
 | 
			
		||||
  ssl_certificate /etc/ssl/ots/cert.pem;
 | 
			
		||||
  ssl_certificate_key /etc/ssl/ots/key.pem;
 | 
			
		||||
 | 
			
		||||
  location / {
 | 
			
		||||
    add_header X-Robots-Tag noindex;
 | 
			
		||||
 | 
			
		||||
    proxy_set_header Upgrade \$http_upgrade;
 | 
			
		||||
    proxy_set_header Connection "Upgrade";
 | 
			
		||||
    proxy_set_header Host \$host;
 | 
			
		||||
    proxy_set_header X-Real-IP \$remote_addr;
 | 
			
		||||
    proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
 | 
			
		||||
    proxy_set_header X-Forwarded-Proto \$scheme;
 | 
			
		||||
    client_max_body_size 64M;
 | 
			
		||||
    proxy_pass http://127.0.0.1:3000/;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
ln -s /etc/nginx/sites-available/ots.conf /etc/nginx/sites-enabled/
 | 
			
		||||
rm -f /etc/nginx/sites-enabled/default
 | 
			
		||||
$STD systemctl reload nginx
 | 
			
		||||
msg_ok "Configured nginx"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Services"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/ots.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=One-Time-Secret Service
 | 
			
		||||
After=network-online.target
 | 
			
		||||
Requires=network-online.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
EnvironmentFile=/opt/ots/.env
 | 
			
		||||
ExecStart=/opt/ots/ots
 | 
			
		||||
Restart=Always
 | 
			
		||||
RestartSecs=5
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
systemctl enable -q --now ots
 | 
			
		||||
msg_ok "Created Services"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
@@ -13,15 +13,10 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  git
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
NODE_VERSION="22" setup_nodejs
 | 
			
		||||
fetch_and_deploy_gh_release "pairdrop" "schlagmichdoch/PairDrop" "tarball"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing PairDrop"
 | 
			
		||||
git clone -q https://github.com/schlagmichdoch/PairDrop.git /opt/pairdrop
 | 
			
		||||
msg_info "Configuring PairDrop"
 | 
			
		||||
cd /opt/pairdrop
 | 
			
		||||
$STD npm install
 | 
			
		||||
msg_ok "Installed PairDrop"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										92
									
								
								install/palmr-install.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								install/palmr-install.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,92 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2025 Community Scripts ORG
 | 
			
		||||
# Author: vhsdream
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://github.com/kyantech/Palmr
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
fetch_and_deploy_gh_release "Palmr" "kyantech/Palmr" "tarball" "latest" "/opt/palmr"
 | 
			
		||||
PNPM="$(jq -r '.packageManager' /opt/palmr/package.json)" NODE_VERSION="20" NODE_MODULE="$PNPM" setup_nodejs
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring palmr backend"
 | 
			
		||||
PALMR_DIR="/opt/palmr_data"
 | 
			
		||||
mkdir -p "$PALMR_DIR"
 | 
			
		||||
PALMR_DB="${PALMR_DIR}/palmr.db"
 | 
			
		||||
PALMR_KEY="$(openssl rand -hex 32)"
 | 
			
		||||
cd /opt/palmr/apps/server
 | 
			
		||||
sed -e 's/_ENCRYPTION=true/_ENCRYPTION=false/' \
 | 
			
		||||
  -e '/^# ENC/s/# //' \
 | 
			
		||||
  -e "s/ENCRYPTION_KEY=.*$/ENCRYPTION_KEY=$PALMR_KEY/" \
 | 
			
		||||
  -e "s|file:.*$|file:$PALMR_DB\"|" \
 | 
			
		||||
  -e '/db"$/a\# Uncomment below when using reverse proxy\
 | 
			
		||||
# SECURE_SITE=true' \
 | 
			
		||||
  .env.example >./.env
 | 
			
		||||
$STD pnpm install
 | 
			
		||||
$STD pnpm dlx prisma generate
 | 
			
		||||
$STD pnpm dlx prisma migrate deploy
 | 
			
		||||
$STD pnpm dlx prisma db push
 | 
			
		||||
$STD pnpm db:seed
 | 
			
		||||
$STD pnpm build
 | 
			
		||||
msg_ok "Configured palmr backend"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring palmr frontend"
 | 
			
		||||
cd /opt/palmr/apps/web
 | 
			
		||||
mv ./.env.example ./.env
 | 
			
		||||
export NODE_ENV=production
 | 
			
		||||
export NEXT_TELEMETRY_DISABLED=1
 | 
			
		||||
$STD pnpm install
 | 
			
		||||
$STD pnpm build
 | 
			
		||||
msg_ok "Configured palmr frontend"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating service"
 | 
			
		||||
useradd -d "$PALMR_DIR" -M -s /usr/sbin/nologin -U palmr
 | 
			
		||||
chown -R palmr:palmr "$PALMR_DIR" /opt/palmr
 | 
			
		||||
cat <<EOF >/etc/systemd/system/palmr-backend.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=palmr Backend Service
 | 
			
		||||
After=network.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
User=palmr
 | 
			
		||||
Group=palmr
 | 
			
		||||
WorkingDirectory=/opt/palmr_data
 | 
			
		||||
ExecStart=/usr/bin/node /opt/palmr/apps/server/dist/server.js
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
cat <<EOF >/etc/systemd/system/palmr-frontend.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=palmr Frontend Service
 | 
			
		||||
After=network.target palmr-backend.service
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
User=palmr
 | 
			
		||||
Group=palmr
 | 
			
		||||
WorkingDirectory=/opt/palmr/apps/web
 | 
			
		||||
ExecStart=/usr/bin/pnpm start
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
systemctl enable -q --now palmr-backend palmr-frontend
 | 
			
		||||
msg_ok "Created service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
@@ -16,42 +16,15 @@ update_os
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  git \
 | 
			
		||||
  software-properties-common \
 | 
			
		||||
  apt-transport-https \
 | 
			
		||||
  ca-certificates \
 | 
			
		||||
  nginx \
 | 
			
		||||
  redis-server
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
setup_mariadb
 | 
			
		||||
 | 
			
		||||
msg_info "Adding PHP Repository"
 | 
			
		||||
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
 | 
			
		||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
 | 
			
		||||
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
msg_ok "Added PHP Repository"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing PHP"
 | 
			
		||||
$STD apt-get remove -y php8.2*
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  php8.3 \
 | 
			
		||||
  php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm,redis}
 | 
			
		||||
msg_info "Installed PHP"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Composer"
 | 
			
		||||
$STD curl -fsSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 | 
			
		||||
msg_ok "Installed Composer"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Paymenter"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
 | 
			
		||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
 | 
			
		||||
mkdir -p /opt/paymenter
 | 
			
		||||
cd /opt/paymenter
 | 
			
		||||
curl -fsSL "https://github.com/paymenter/paymenter/releases/download/${RELEASE}/paymenter.tar.gz" -o paymenter.tar.gz
 | 
			
		||||
$STD tar -xzvf paymenter.tar.gz
 | 
			
		||||
chmod -R 755 storage/* bootstrap/cache/
 | 
			
		||||
msg_ok "Installed Paymenter"
 | 
			
		||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="common,mysql,fpm,redis" setup_php
 | 
			
		||||
setup_composer
 | 
			
		||||
fetch_and_deploy_gh_release "paymenter" "paymenter/paymenter" "prebuild" "latest" "/opt/paymenter" "paymenter.tar.gz"
 | 
			
		||||
chmod -R 755 /opt/paymenter/storage/* /opt/paymenter/bootstrap/cache/
 | 
			
		||||
 | 
			
		||||
msg_info "Setting up database"
 | 
			
		||||
DB_NAME=paymenter
 | 
			
		||||
@@ -67,6 +40,7 @@ $STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'local
 | 
			
		||||
  echo "Username: $DB_USER"
 | 
			
		||||
  echo "Password: $DB_PASS"
 | 
			
		||||
} >>~/paymenter_db.creds
 | 
			
		||||
cd /opt/paymenter
 | 
			
		||||
cp .env.example .env
 | 
			
		||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
 | 
			
		||||
$STD php artisan key:generate --force
 | 
			
		||||
@@ -138,11 +112,11 @@ systemctl enable --now paymenter
 | 
			
		||||
systemctl enable --now redis-server
 | 
			
		||||
msg_ok "Setup Service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -rf /opt/paymenter/paymenter.tar.gz
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 
 | 
			
		||||
@@ -13,12 +13,13 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Pocketbase"
 | 
			
		||||
RELEASE="$(curl -fsSL https://api.github.com/repos/pocketbase/pocketbase/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')"
 | 
			
		||||
curl -fsSL "https://github.com/pocketbase/pocketbase/releases/download/v${RELEASE}/pocketbase_${RELEASE}_linux_amd64.zip" -o "/tmp/pocketbase.zip"
 | 
			
		||||
mkdir -p /opt/pocketbase/{pb_public,pb_migrations,pb_hooks}
 | 
			
		||||
$STD unzip -o /tmp/pocketbase.zip -d /opt/pocketbase
 | 
			
		||||
fetch_and_deploy_gh_release "pocketbase" "pocketbase/pocketbase" "prebuild" "latest" "/opt/pocketbase" "pocketbase*linux_amd64.zip"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring Pocketbase"
 | 
			
		||||
mkdir -p /opt/pocketbase/{pb_public,pb_migrations,pb_hooks}
 | 
			
		||||
msg_ok "Configured Pocketbase"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/pocketbase.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description = pocketbase
 | 
			
		||||
@@ -35,15 +36,13 @@ ExecStart      = /opt/pocketbase/pocketbase serve --http=0.0.0.0:8080
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy = multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
systemctl enable -q --now pocketbase
 | 
			
		||||
msg_ok "Installed Pocketbase"
 | 
			
		||||
msg_ok "Service created"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -rf /tmp/pocketbase.zip
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 
 | 
			
		||||
@@ -14,12 +14,9 @@ network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
read -r -p "${TAB3}What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url
 | 
			
		||||
msg_info "Setup Pocket ID"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pocket-id/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
mkdir -p /opt/pocket-id
 | 
			
		||||
curl -fsSL "https://github.com/pocket-id/pocket-id/releases/download/v${RELEASE}/pocket-id-linux-amd64" -o /opt/pocket-id/pocket-id
 | 
			
		||||
chmod u+x /opt/pocket-id/pocket-id
 | 
			
		||||
fetch_and_deploy_gh_release "pocket-id" "pocket-id/pocket-id" "singlefile" "latest" "/opt/pocket-id/" "pocket-id-linux-amd64"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring Pocket ID"
 | 
			
		||||
cat <<EOF >/opt/pocket-id/.env
 | 
			
		||||
APP_ENV=production
 | 
			
		||||
APP_URL=https://${public_url}
 | 
			
		||||
@@ -28,8 +25,7 @@ TRUST_PROXY=false
 | 
			
		||||
PORT=1411
 | 
			
		||||
HOST=0.0.0.0
 | 
			
		||||
EOF
 | 
			
		||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
			
		||||
msg_ok "Setup Pocket ID"
 | 
			
		||||
msg_ok "Configured Pocket ID"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/pocketid.service
 | 
			
		||||
@@ -63,6 +59,3 @@ msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 
 | 
			
		||||
@@ -16,20 +16,11 @@ update_os
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  nginx \
 | 
			
		||||
  php8.2-fpm \
 | 
			
		||||
  php8.2-{common,cli,gd,mbstring,xml,fpm,curl,zip} \
 | 
			
		||||
  openssl
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing PrivateBin"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/PrivateBin/PrivateBin/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
 | 
			
		||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
			
		||||
mkdir -p /opt/privatebin
 | 
			
		||||
cd /opt/privatebin
 | 
			
		||||
curl -fsSL "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip"
 | 
			
		||||
$STD unzip ${RELEASE}.zip
 | 
			
		||||
mv PrivateBin-${RELEASE}/* .
 | 
			
		||||
msg_ok "Installed PrivateBin"
 | 
			
		||||
PHP_VERSION="8.2" PHP_MODULE="common,fpm" setup_php
 | 
			
		||||
fetch_and_deploy_gh_release "privatebin" "PrivateBin/PrivateBin" "tarball"
 | 
			
		||||
 | 
			
		||||
msg_info "Generating Universal SSL Certificate"
 | 
			
		||||
mkdir -p /etc/ssl/privatebin
 | 
			
		||||
@@ -41,7 +32,7 @@ msg_ok "Certificate Generated"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring Environment"
 | 
			
		||||
mkdir -p /opt/privatebin/data
 | 
			
		||||
cp cfg/conf.sample.php /opt/privatebin/cfg/conf.php
 | 
			
		||||
cp /opt/privatebin/cfg/conf.sample.php /opt/privatebin/cfg/conf.php
 | 
			
		||||
sed -i "s|// 'traffic'|'traffic'|g" /opt/privatebin/cfg/conf.php
 | 
			
		||||
chown -R www-data:www-data /opt/privatebin
 | 
			
		||||
chmod -R 0755 /opt/privatebin/data
 | 
			
		||||
@@ -96,12 +87,10 @@ rm -f /etc/nginx/sites-enabled/default
 | 
			
		||||
systemctl reload nginx
 | 
			
		||||
msg_ok "Nginx Configured"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -rf /opt/privatebin/${RELEASE}.zip
 | 
			
		||||
rm -rf /opt/privatebin/PrivateBin-${RELEASE}
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 
 | 
			
		||||
@@ -13,16 +13,12 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Prometheus Alertmanager"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/prometheus/alertmanager/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
mkdir -p /etc/alertmanager
 | 
			
		||||
mkdir -p /var/lib/alertmanager
 | 
			
		||||
curl -fsSL "https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-amd64.tar.gz" -o "alertmanager-${RELEASE}.linux-amd64.tar.gz"
 | 
			
		||||
tar -xf alertmanager-${RELEASE}.linux-amd64.tar.gz
 | 
			
		||||
mv alertmanager-${RELEASE}.linux-amd64/alertmanager alertmanager-${RELEASE}.linux-amd64/amtool /usr/local/bin/
 | 
			
		||||
mv alertmanager-${RELEASE}.linux-amd64/alertmanager.yml /etc/alertmanager/alertmanager.yml
 | 
			
		||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
			
		||||
msg_ok "Installed Prometheus Alertmanager"
 | 
			
		||||
fetch_and_deploy_gh_release "alertmanager" "prometheus/alertmanager" "prebuild" "latest" "/usr/local/bin/" "alertmanager*linux-amd64.tar.gz"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring Prometheus Alertmanager"
 | 
			
		||||
mkdir -p /etc/alertmanager /var/lib/alertmanager
 | 
			
		||||
mv /usr/local/bin/alertmanager.yml /etc/alertmanager/alertmanager.yml
 | 
			
		||||
msg_ok "Configured Prometheus Alertmanager"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/prometheus-alertmanager.service
 | 
			
		||||
@@ -53,5 +49,4 @@ customize
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
rm -rf alertmanager-${RELEASE}.linux-amd64 alertmanager-${RELEASE}.linux-amd64.tar.gz
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 
 | 
			
		||||
@@ -20,37 +20,23 @@ $STD apt-get install -y \
 | 
			
		||||
  policykit-1
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating dedicated user pulse..."
 | 
			
		||||
msg_info "Creating User"
 | 
			
		||||
if useradd -r -m -d /opt/pulse-home -s /bin/bash pulse; then
 | 
			
		||||
  msg_ok "User created."
 | 
			
		||||
  msg_ok "Created User"
 | 
			
		||||
else
 | 
			
		||||
  msg_error "User creation failed."
 | 
			
		||||
  msg_error "User creation failed"
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
NODE_VERSION="20" setup_nodejs
 | 
			
		||||
 | 
			
		||||
msg_info "Setup Pulse"
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
temp_file=$(mktemp)
 | 
			
		||||
mkdir -p /opt/pulse
 | 
			
		||||
curl -fsSL "https://github.com/rcourtman/Pulse/releases/download/v${RELEASE}/pulse-v${RELEASE}.tar.gz" -o "$temp_file"
 | 
			
		||||
tar zxf "$temp_file" --strip-components=1 -C /opt/pulse
 | 
			
		||||
touch /opt/pulse/.env
 | 
			
		||||
chown pulse:pulse /opt/pulse/.env
 | 
			
		||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
 | 
			
		||||
mkdir -p /etc/pulse
 | 
			
		||||
fetch_and_deploy_gh_release "pulse" "rcourtman/Pulse" "prebuild" "latest" "/opt/pulse" "*-linux-amd64.tar.gz"
 | 
			
		||||
chown -R pulse:pulse /etc/pulse /opt/pulse
 | 
			
		||||
msg_ok "Installed Pulse"
 | 
			
		||||
 | 
			
		||||
msg_info "Setting permissions for /opt/pulse..."
 | 
			
		||||
chown -R pulse:pulse "/opt/pulse"
 | 
			
		||||
find "/opt/pulse" -type d -exec chmod 755 {} \;
 | 
			
		||||
find "/opt/pulse" -type f -exec chmod 644 {} \;
 | 
			
		||||
msg_ok "Set permissions."
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/pulse.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Pulse Monitoring Application
 | 
			
		||||
Description=Pulse Monitoring Server
 | 
			
		||||
After=network.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
@@ -58,12 +44,13 @@ Type=simple
 | 
			
		||||
User=pulse
 | 
			
		||||
Group=pulse
 | 
			
		||||
WorkingDirectory=/opt/pulse
 | 
			
		||||
EnvironmentFile=/opt/pulse/.env
 | 
			
		||||
ExecStart=/usr/bin/npm run start
 | 
			
		||||
Restart=on-failure
 | 
			
		||||
RestartSec=5
 | 
			
		||||
ExecStart=/opt/pulse/pulse
 | 
			
		||||
Restart=always
 | 
			
		||||
RestartSec=3
 | 
			
		||||
StandardOutput=journal
 | 
			
		||||
StandardError=journal
 | 
			
		||||
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 | 
			
		||||
Environment="PULSE_DATA_DIR=/etc/pulse"
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
@@ -75,7 +62,6 @@ motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
rm -f "$temp_file"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,7 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck
 | 
			
		||||
# Co-Author: MickLesk (Canbiz)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (Canbiz)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://tandoor.dev/
 | 
			
		||||
 | 
			
		||||
@@ -17,6 +16,7 @@ update_os
 | 
			
		||||
msg_info "Installing Dependencies (Patience)"
 | 
			
		||||
$STD apt-get install -y --no-install-recommends \
 | 
			
		||||
  build-essential \
 | 
			
		||||
  python3 \
 | 
			
		||||
  libpq-dev \
 | 
			
		||||
  libmagic-dev \
 | 
			
		||||
  libzbar0 \
 | 
			
		||||
@@ -24,72 +24,72 @@ $STD apt-get install -y --no-install-recommends \
 | 
			
		||||
  libsasl2-dev \
 | 
			
		||||
  libldap2-dev \
 | 
			
		||||
  libssl-dev \
 | 
			
		||||
  git \
 | 
			
		||||
  make \
 | 
			
		||||
  pkg-config \
 | 
			
		||||
  libxmlsec1-dev \
 | 
			
		||||
  libxml2-dev \
 | 
			
		||||
  libxmlsec1-openssl
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Setup Python3"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  python3 \
 | 
			
		||||
  python3-dev \
 | 
			
		||||
  python3-setuptools \
 | 
			
		||||
  python3-pip \
 | 
			
		||||
  python3-xmlsec
 | 
			
		||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
 | 
			
		||||
msg_ok "Setup Python3"
 | 
			
		||||
NODE_VERSION="20" NODE_MODULE="yarn" setup_nodejs
 | 
			
		||||
fetch_and_deploy_gh_release "tandoor" "TandoorRecipes/recipes" "tarball" "latest" "/opt/tandoor"
 | 
			
		||||
PG_VERSION="16" setup_postgresql
 | 
			
		||||
PYTHON_VERSION="3.13" setup_uv
 | 
			
		||||
 | 
			
		||||
NODE_VERSION="20" NODE_MODULE="yarn@latest" setup_nodejs
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Tandoor (Patience)"
 | 
			
		||||
$STD git clone https://github.com/TandoorRecipes/recipes -b master /opt/tandoor
 | 
			
		||||
mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles}
 | 
			
		||||
$STD pip3 install -r /opt/tandoor/requirements.txt
 | 
			
		||||
cd /opt/tandoor/vue
 | 
			
		||||
$STD yarn install
 | 
			
		||||
$STD yarn build
 | 
			
		||||
curl -fsSL "https://raw.githubusercontent.com/TandoorRecipes/recipes/develop/.env.template" -o "/opt/tandoor/.env"
 | 
			
		||||
msg_info "Set up PostgreSQL Database"
 | 
			
		||||
DB_NAME=db_recipes
 | 
			
		||||
DB_USER=tandoor
 | 
			
		||||
DB_ENCODING=utf8
 | 
			
		||||
DB_TIMEZONE=UTC
 | 
			
		||||
secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g')
 | 
			
		||||
SECRET_KEY=$(openssl rand -base64 45 | sed 's/\//\\\//g')
 | 
			
		||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
 | 
			
		||||
sed -i -e "s|SECRET_KEY=.*|SECRET_KEY=$secret_key|g" \
 | 
			
		||||
  -e "s|POSTGRES_HOST=.*|POSTGRES_HOST=localhost|g" \
 | 
			
		||||
  -e "s|POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$DB_PASS|g" \
 | 
			
		||||
  -e "s|POSTGRES_DB=.*|POSTGRES_DB=$DB_NAME|g" \
 | 
			
		||||
  -e "s|POSTGRES_USER=.*|POSTGRES_USER=$DB_USER|g" \
 | 
			
		||||
  -e "\$a\STATIC_URL=/staticfiles/" /opt/tandoor/.env
 | 
			
		||||
cd /opt/tandoor
 | 
			
		||||
$STD python3 version.py
 | 
			
		||||
msg_ok "Installed Tandoor"
 | 
			
		||||
 | 
			
		||||
msg_info "Install/Set up PostgreSQL Database"
 | 
			
		||||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
 | 
			
		||||
echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
$STD apt-get install -y postgresql-16
 | 
			
		||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
 | 
			
		||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
 | 
			
		||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
 | 
			
		||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
 | 
			
		||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
 | 
			
		||||
echo "" >>~/tandoor.creds
 | 
			
		||||
echo -e "Tandoor Database Name: \e[32m$DB_NAME\e[0m" >>~/tandoor.creds
 | 
			
		||||
echo -e "Tandoor Database User: \e[32m$DB_USER\e[0m" >>~/tandoor.creds
 | 
			
		||||
echo -e "Tandoor Database Password: \e[32m$DB_PASS\e[0m" >>~/tandoor.creds
 | 
			
		||||
export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
 | 
			
		||||
/usr/bin/python3 /opt/tandoor/manage.py migrate >/dev/null 2>&1
 | 
			
		||||
/usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input >/dev/null 2>&1
 | 
			
		||||
/usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse >/dev/null 2>&1
 | 
			
		||||
{
 | 
			
		||||
  echo "Tandoor-Credentials"
 | 
			
		||||
  echo "Tandoor Database Name: $DB_NAME"
 | 
			
		||||
  echo "Tandoor Database User: $DB_USER"
 | 
			
		||||
  echo "Tandoor Database Password: $DB_PASS"
 | 
			
		||||
} >>~/tandoor.creds
 | 
			
		||||
msg_ok "Set up PostgreSQL Database"
 | 
			
		||||
 | 
			
		||||
msg_info "Setup Tandoor"
 | 
			
		||||
mkdir -p /opt/tandoor/{config,api,mediafiles,staticfiles}
 | 
			
		||||
cd /opt/tandoor
 | 
			
		||||
$STD uv venv .venv --python=python3
 | 
			
		||||
$STD uv pip install -r requirements.txt --python .venv/bin/python
 | 
			
		||||
cd /opt/tandoor/vue3
 | 
			
		||||
$STD yarn install
 | 
			
		||||
$STD yarn build
 | 
			
		||||
cat <<EOF >/opt/tandoor/.env
 | 
			
		||||
SECRET_KEY=$SECRET_KEY
 | 
			
		||||
TZ=Europe/Berlin
 | 
			
		||||
 | 
			
		||||
DB_ENGINE=django.db.backends.postgresql
 | 
			
		||||
POSTGRES_HOST=localhost
 | 
			
		||||
POSTGRES_DB=$DB_NAME
 | 
			
		||||
POSTGRES_PORT=5432
 | 
			
		||||
POSTGRES_USER=$DB_USER
 | 
			
		||||
POSTGRES_PASSWORD=$DB_PASS
 | 
			
		||||
 | 
			
		||||
STATIC_URL=/staticfiles/
 | 
			
		||||
MEDIA_URL=/mediafiles/
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
TANDOOR_VERSION="$(curl -s https://api.github.com/repos/TandoorRecipes/recipes/releases/latest | jq -r .tag_name)"
 | 
			
		||||
cat <<EOF >/opt/tandoor/cookbook/version_info.py
 | 
			
		||||
TANDOOR_VERSION = "$TANDOOR_VERSION"
 | 
			
		||||
TANDOOR_REF = "bare-metal"
 | 
			
		||||
VERSION_INFO = []
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
cd /opt/tandoor
 | 
			
		||||
$STD /opt/tandoor/.venv/bin/python manage.py migrate
 | 
			
		||||
$STD /opt/tandoor/.venv/bin/python manage.py collectstatic --no-input
 | 
			
		||||
msg_ok "Installed Tandoor"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Services"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/gunicorn_tandoor.service
 | 
			
		||||
cat <<EOF >/etc/systemd/system/tandoor.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=gunicorn daemon for tandoor
 | 
			
		||||
After=network.target
 | 
			
		||||
@@ -100,7 +100,7 @@ Restart=always
 | 
			
		||||
RestartSec=3
 | 
			
		||||
WorkingDirectory=/opt/tandoor
 | 
			
		||||
EnvironmentFile=/opt/tandoor/.env
 | 
			
		||||
ExecStart=/usr/local/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:/opt/tandoor/tandoor.sock recipes.wsgi:application
 | 
			
		||||
ExecStart=/opt/tandoor/.venv/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:/opt/tandoor/tandoor.sock recipes.wsgi:application
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
@@ -109,8 +109,8 @@ EOF
 | 
			
		||||
cat <<'EOF' >/etc/nginx/conf.d/tandoor.conf
 | 
			
		||||
server {
 | 
			
		||||
    listen 8002;
 | 
			
		||||
    #access_log /var/log/nginx/access.log;
 | 
			
		||||
    #error_log /var/log/nginx/error.log;
 | 
			
		||||
    access_log /var/log/nginx/access.log;
 | 
			
		||||
    error_log /var/log/nginx/error.log;
 | 
			
		||||
    client_max_body_size 128M;
 | 
			
		||||
    # serve media files
 | 
			
		||||
    location /static/ {
 | 
			
		||||
@@ -123,12 +123,15 @@ server {
 | 
			
		||||
 | 
			
		||||
    location / {
 | 
			
		||||
        proxy_set_header Host $http_host;
 | 
			
		||||
        proxy_set_header X-Real-IP $remote_addr;
 | 
			
		||||
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 | 
			
		||||
        proxy_set_header X-Forwarded-Proto $scheme;
 | 
			
		||||
        proxy_pass http://unix:/opt/tandoor/tandoor.sock;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
EOF
 | 
			
		||||
systemctl reload nginx
 | 
			
		||||
systemctl enable -q --now gunicorn_tandoor
 | 
			
		||||
systemctl enable -q --now tandoor
 | 
			
		||||
msg_ok "Created Services"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										76
									
								
								install/tududi-install.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								install/tududi-install.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,76 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2025 Community Scripts ORG
 | 
			
		||||
# Author: vhsdream
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://tududi.com/
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
$STD apt-get install -y \
 | 
			
		||||
  sqlite3 \
 | 
			
		||||
  yq
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
NODE_VERSION="20" setup_nodejs
 | 
			
		||||
fetch_and_deploy_gh_release "tududi" "chrisvel/tududi"
 | 
			
		||||
 | 
			
		||||
msg_info "Configuring Tududi"
 | 
			
		||||
cd /opt/tududi
 | 
			
		||||
$STD npm install
 | 
			
		||||
export NODE_ENV=production
 | 
			
		||||
$STD npm run frontend:build
 | 
			
		||||
mv ./dist ./backend
 | 
			
		||||
mv ./public/locales ./backend/dist
 | 
			
		||||
mv ./public/favicon.* ./backend/dist
 | 
			
		||||
msg_ok "Configured Tududi"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating env and database"
 | 
			
		||||
DB_LOCATION="/opt/tududi-db"
 | 
			
		||||
UPLOAD_DIR="/opt/tududi-uploads"
 | 
			
		||||
mkdir -p {"$DB_LOCATION","$UPLOAD_DIR"}
 | 
			
		||||
SECRET="$(openssl rand -hex 64)"
 | 
			
		||||
sed -e 's/^GOOGLE/# &/' \
 | 
			
		||||
  -e '/TUDUDI_SESSION/s/^# //' \
 | 
			
		||||
  -e '/NODE_ENV/s/^# //' \
 | 
			
		||||
  -e "s/your_session_secret_here/$SECRET/" \
 | 
			
		||||
  -e 's/development/production/' \
 | 
			
		||||
  -e "\$a\DB_FILE=$DB_LOCATION/production.sqlite3" \
 | 
			
		||||
  -e "\$a\TUDUDI_UPLOAD_PATH=$UPLOAD_DIR" \
 | 
			
		||||
  /opt/tududi/backend/.env.example >/opt/tududi/backend/.env
 | 
			
		||||
export DB_FILE="$DB_LOCATION/production.sqlite3"
 | 
			
		||||
$STD npm run db:init
 | 
			
		||||
msg_ok "Created env and database"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/tududi.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Tududi Service
 | 
			
		||||
After=network.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
WorkingDirectory=/opt/tududi
 | 
			
		||||
EnvironmentFile=/opt/tududi/backend/.env
 | 
			
		||||
ExecStart=/usr/bin/npm run start
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
systemctl enable -q --now tududi
 | 
			
		||||
msg_ok "Created service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
@@ -28,8 +28,8 @@ if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
 | 
			
		||||
  msg_ok "No AVX Support Detected"
 | 
			
		||||
  msg_info "Installing MongoDB 4.4"
 | 
			
		||||
  if ! dpkg -l | grep -q "libssl1.1"; then
 | 
			
		||||
    curl -fsSL "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_amd64.deb" -o "libssl1.1_1.1.1n-0+deb10u6_amd64.deb"
 | 
			
		||||
    $STD dpkg -i libssl1.1_1.1.1n-0+deb10u6_amd64.deb
 | 
			
		||||
    curl -fsSL "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u3_amd64.deb" -o "libssl1.1_1.1.1w-0+deb11u3_amd64.deb"
 | 
			
		||||
    $STD dpkg -i libssl1.1_1.1.1w-0+deb11u3_amd64.deb
 | 
			
		||||
  fi
 | 
			
		||||
  curl -fsSL "https://www.mongodb.org/static/pgp/server-4.4.asc" | gpg --dearmor >/usr/share/keyrings/mongodb-server-4.4.gpg
 | 
			
		||||
  echo "deb [signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" >/etc/apt/sources.list.d/mongodb-org-4.4.list
 | 
			
		||||
 
 | 
			
		||||
@@ -13,8 +13,17 @@ setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
fetch_and_deploy_gh_release "victoriametrics" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "victoria-metrics-linux-amd64-v+([0-9.]).tar.gz"
 | 
			
		||||
fetch_and_deploy_gh_release "vmutils" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "vmutils-linux-amd64-v+([0-9.]).tar.gz"
 | 
			
		||||
msg_info "Getting latest version of VictoriaMetrics"
 | 
			
		||||
victoriametrics_filename=$(curl -fsSL "https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest" |
 | 
			
		||||
  jq -r '.assets[].name' |
 | 
			
		||||
  grep -E '^victoria-metrics-linux-amd64-v[0-9.]+\.tar\.gz$')
 | 
			
		||||
vmutils_filename=$(curl -fsSL "https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest" |
 | 
			
		||||
  jq -r '.assets[].name' |
 | 
			
		||||
  grep -E '^vmutils-linux-amd64-v[0-9.]+\.tar\.gz$')
 | 
			
		||||
msg_ok "Got latest version of VictoriaMetrics"
 | 
			
		||||
 | 
			
		||||
fetch_and_deploy_gh_release "victoriametrics" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "$victoriametrics_filename"
 | 
			
		||||
fetch_and_deploy_gh_release "vmutils" "VictoriaMetrics/VictoriaMetrics" "prebuild" "latest" "/opt/victoriametrics" "$vmutils_filename"
 | 
			
		||||
 | 
			
		||||
read -r -p "${TAB3}Would you like to add VictoriaLogs? <y/N> " prompt
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -65,36 +65,36 @@ root_check() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1030,10 +1030,9 @@ check_container_resources() {
 | 
			
		||||
  if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then
 | 
			
		||||
    echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}"
 | 
			
		||||
    echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n"
 | 
			
		||||
    echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? <yes/No>  "
 | 
			
		||||
    echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? [y/N] "
 | 
			
		||||
    read -r prompt
 | 
			
		||||
    # Check if the input is 'yes', otherwise exit with status 1
 | 
			
		||||
    if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then
 | 
			
		||||
    if [[ ! "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
			
		||||
      echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
@@ -1050,10 +1049,9 @@ check_container_storage() {
 | 
			
		||||
  if ((usage > 80)); then
 | 
			
		||||
    # Prompt the user for confirmation to continue
 | 
			
		||||
    echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}"
 | 
			
		||||
    echo -ne "Continue anyway? <y/N>  "
 | 
			
		||||
    echo -ne "Continue anyway? [y/N] "
 | 
			
		||||
    read -r prompt
 | 
			
		||||
    # Check if the input is 'y' or 'yes', otherwise exit with status 1
 | 
			
		||||
    if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then
 | 
			
		||||
    if [[ ! "${prompt,,}" =~ ^(y|yes)$ ]]; then
 | 
			
		||||
      echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
@@ -1282,37 +1280,43 @@ EOF
 | 
			
		||||
  if [ "$var_os" != "alpine" ]; then
 | 
			
		||||
    msg_info "Waiting for network in LXC container"
 | 
			
		||||
    for i in {1..10}; do
 | 
			
		||||
      # 1. Primary check: ICMP ping (fastest, but may be blocked by ISP/firewall)
 | 
			
		||||
      if pct exec "$CTID" -- ping -c1 -W1 deb.debian.org >/dev/null 2>&1; then
 | 
			
		||||
        msg_ok "Network in LXC is reachable"
 | 
			
		||||
        break
 | 
			
		||||
      fi
 | 
			
		||||
      if pct exec "$CTID" -- curl -fsSIL --max-time 10 deb.debian.org >/dev/null 2>&1; then
 | 
			
		||||
        msg_ok "Network in LXC is reachable"
 | 
			
		||||
        msg_ok "Network in LXC is reachable (ping)"
 | 
			
		||||
        break
 | 
			
		||||
      fi
 | 
			
		||||
      # Wait and retry if not reachable yet
 | 
			
		||||
      if [ "$i" -lt 10 ]; then
 | 
			
		||||
        msg_warn "No network yet in LXC (try $i/10) – waiting..."
 | 
			
		||||
        msg_warn "No network in LXC yet (try $i/10) – waiting..."
 | 
			
		||||
        sleep 3
 | 
			
		||||
      else
 | 
			
		||||
        msg_error "No network in LXC after waiting."
 | 
			
		||||
        # After 10 unsuccessful ping attempts, try HTTP connectivity via wget as fallback
 | 
			
		||||
        msg_warn "Ping failed 10 times. Trying HTTP connectivity check (wget) as fallback..."
 | 
			
		||||
        if pct exec "$CTID" -- wget -q --spider http://deb.debian.org; then
 | 
			
		||||
          msg_ok "Network in LXC is reachable (wget fallback)"
 | 
			
		||||
        else
 | 
			
		||||
          msg_error "No network in LXC after all checks."
 | 
			
		||||
          read -r -p "Set fallback DNS (1.1.1.1/8.8.8.8)? [y/N]: " choice
 | 
			
		||||
          case "$choice" in
 | 
			
		||||
          [yY]*)
 | 
			
		||||
            pct set "$CTID" --nameserver 1.1.1.1
 | 
			
		||||
            pct set "$CTID" --nameserver 8.8.8.8
 | 
			
		||||
          if pct exec "$CTID" -- ping -c1 -W1 deb.debian.org >/dev/null 2>&1; then
 | 
			
		||||
            # Final attempt with wget after DNS change
 | 
			
		||||
            if pct exec "$CTID" -- wget -q --spider http://deb.debian.org; then
 | 
			
		||||
              msg_ok "Network reachable after DNS fallback"
 | 
			
		||||
            else
 | 
			
		||||
              msg_error "Still no network/DNS in LXC! Aborting customization."
 | 
			
		||||
            exit 1
 | 
			
		||||
              exit_script
 | 
			
		||||
            fi
 | 
			
		||||
            ;;
 | 
			
		||||
          *)
 | 
			
		||||
            msg_error "Aborted by user – no DNS fallback set."
 | 
			
		||||
          exit 1
 | 
			
		||||
            exit_script
 | 
			
		||||
            ;;
 | 
			
		||||
          esac
 | 
			
		||||
        fi
 | 
			
		||||
        break
 | 
			
		||||
      fi
 | 
			
		||||
    done
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
@@ -1346,7 +1350,7 @@ EOF'
 | 
			
		||||
  fi
 | 
			
		||||
  msg_ok "Customized LXC Container"
 | 
			
		||||
 | 
			
		||||
  lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" $?
 | 
			
		||||
  lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/${var_install}.sh)"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function sets the description of the container.
 | 
			
		||||
 
 | 
			
		||||
@@ -250,7 +250,7 @@ setup_mariadb() {
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  msg_info "Setting up MariaDB $MARIADB_VERSION"
 | 
			
		||||
  # grab dynamic latest LTS version
 | 
			
		||||
  # Grab dynamic latest LTS version
 | 
			
		||||
  if [[ "$MARIADB_VERSION" == "latest" ]]; then
 | 
			
		||||
    MARIADB_VERSION=$(curl -fsSL http://mirror.mariadb.org/repo/ |
 | 
			
		||||
      grep -Eo '[0-9]+\.[0-9]+\.[0-9]+/' |
 | 
			
		||||
@@ -293,7 +293,17 @@ setup_mariadb() {
 | 
			
		||||
    >/etc/apt/sources.list.d/mariadb.list
 | 
			
		||||
 | 
			
		||||
  $STD apt-get update
 | 
			
		||||
  $STD apt-get install -y mariadb-server mariadb-client
 | 
			
		||||
 | 
			
		||||
  local MARIADB_MAJOR_MINOR
 | 
			
		||||
  MARIADB_MAJOR_MINOR=$(echo "$MARIADB_VERSION" | awk -F. '{print $1"."$2}')
 | 
			
		||||
  if [[ -n "$MARIADB_MAJOR_MINOR" ]]; then
 | 
			
		||||
    echo "mariadb-server-$MARIADB_MAJOR_MINOR mariadb-server/feedback boolean false" | debconf-set-selections
 | 
			
		||||
  else
 | 
			
		||||
    for ver in 12.1 12.0 11.4 11.3 11.2 11.1 11.0 10.11 10.6 10.5 10.4 10.3; do
 | 
			
		||||
      echo "mariadb-server-$ver mariadb-server/feedback boolean false" | debconf-set-selections
 | 
			
		||||
    done
 | 
			
		||||
  fi
 | 
			
		||||
  DEBIAN_FRONTEND=noninteractive $STD apt-get install -y mariadb-server mariadb-client
 | 
			
		||||
 | 
			
		||||
  msg_ok "Setup MariaDB $MARIADB_VERSION"
 | 
			
		||||
}
 | 
			
		||||
@@ -492,39 +502,50 @@ function setup_php() {
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# ------------------------------------------------------------------------------
 | 
			
		||||
# Installs or updates Composer globally.
 | 
			
		||||
# Installs or updates Composer globally (robust, idempotent).
 | 
			
		||||
#
 | 
			
		||||
# Description:
 | 
			
		||||
#   - Downloads latest version from getcomposer.org
 | 
			
		||||
# - Installs to /usr/local/bin/composer
 | 
			
		||||
# - Removes old binaries/symlinks in /usr/bin, /bin, /root/.composer, etc.
 | 
			
		||||
# - Ensures /usr/local/bin is in PATH (permanent)
 | 
			
		||||
# ------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
function setup_composer() {
 | 
			
		||||
  local COMPOSER_BIN="/usr/local/bin/composer"
 | 
			
		||||
  export COMPOSER_ALLOW_SUPERUSER=1
 | 
			
		||||
 | 
			
		||||
  # Clean up old Composer binaries/symlinks (if any)
 | 
			
		||||
  for old in /usr/bin/composer /bin/composer /root/.composer/vendor/bin/composer; do
 | 
			
		||||
    [[ -e "$old" && "$old" != "$COMPOSER_BIN" ]] && rm -f "$old"
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
  # Ensure /usr/local/bin is in PATH for future logins (and current shell)
 | 
			
		||||
  ensure_usr_local_bin_persist
 | 
			
		||||
  export PATH="/usr/local/bin:$PATH"
 | 
			
		||||
 | 
			
		||||
  # Check if composer is already installed
 | 
			
		||||
  if [[ -x "$COMPOSER_BIN" ]]; then
 | 
			
		||||
    local CURRENT_VERSION
 | 
			
		||||
    CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}')
 | 
			
		||||
    $STD msg_info "Old Composer $CURRENT_VERSION found, updating to latest"
 | 
			
		||||
  else
 | 
			
		||||
    msg_info "Setup Composer"
 | 
			
		||||
    msg_info "Installing Composer"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Download and install latest composer
 | 
			
		||||
  # Download and install latest Composer
 | 
			
		||||
  curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
 | 
			
		||||
  php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1
 | 
			
		||||
 | 
			
		||||
  if [[ $? -ne 0 ]]; then
 | 
			
		||||
    msg_error "Failed to install Composer"
 | 
			
		||||
  if [[ ! -x "$COMPOSER_BIN" ]]; then
 | 
			
		||||
    msg_error "Composer was not successfully installed (no binary at $COMPOSER_BIN)"
 | 
			
		||||
    return 1
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  chmod +x "$COMPOSER_BIN"
 | 
			
		||||
  composer diagnose >/dev/null 2>&1
 | 
			
		||||
  msg_ok "Setup Composer"
 | 
			
		||||
  $STD "$COMPOSER_BIN" self-update --no-interaction || true # safe if already latest
 | 
			
		||||
  $STD "$COMPOSER_BIN" diagnose
 | 
			
		||||
  msg_ok "Composer is ready at $COMPOSER_BIN"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# ------------------------------------------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
@@ -1275,9 +1275,9 @@ while true; do
 | 
			
		||||
  esac
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
 | 
			
		||||
if ! pveversion | grep -Eq "pve-manager/(8\.[0-4]|9\.[0-9]+)(\.[0-9]+)*"; then
 | 
			
		||||
  msg_error "This version of Proxmox Virtual Environment is not supported"
 | 
			
		||||
  msg_error "⚠️ Requires Proxmox Virtual Environment Version 8.0 or later."
 | 
			
		||||
  msg_error "⚠️ Requires Proxmox Virtual Environment Version 8.0–8.4 or 9.x."
 | 
			
		||||
  msg_error "Exiting..."
 | 
			
		||||
  sleep 2
 | 
			
		||||
  exit
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# License: MIT
 | 
			
		||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
 | 
			
		||||
@@ -13,26 +12,31 @@ function header_info() {
 | 
			
		||||
 / /   / / _ \/ __ `/ __ \   / /   |   / /
 | 
			
		||||
/ /___/ /  __/ /_/ / / / /  / /___/   / /___
 | 
			
		||||
\____/_/\___/\__,_/_/ /_/  /_____/_/|_\____/
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
set -eEuo pipefail
 | 
			
		||||
BL=$(echo "\033[36m")
 | 
			
		||||
RD=$(echo "\033[01;31m")
 | 
			
		||||
BL="\033[36m"
 | 
			
		||||
RD="\033[01;31m"
 | 
			
		||||
CM='\xE2\x9C\x94\033'
 | 
			
		||||
GN=$(echo "\033[1;92m")
 | 
			
		||||
CL=$(echo "\033[m")
 | 
			
		||||
GN="\033[1;92m"
 | 
			
		||||
CL="\033[m"
 | 
			
		||||
 | 
			
		||||
header_info
 | 
			
		||||
echo "Loading..."
 | 
			
		||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed?" 10 58
 | 
			
		||||
 | 
			
		||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This will clean logs, cache and update package lists on selected LXC Containers. Proceed?" 10 58
 | 
			
		||||
 | 
			
		||||
NODE=$(hostname)
 | 
			
		||||
EXCLUDE_MENU=()
 | 
			
		||||
MSG_MAX_LENGTH=0
 | 
			
		||||
 | 
			
		||||
while read -r TAG ITEM; do
 | 
			
		||||
  OFFSET=2
 | 
			
		||||
  ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
 | 
			
		||||
  EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
 | 
			
		||||
done < <(pct list | awk 'NR>1')
 | 
			
		||||
 | 
			
		||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
 | 
			
		||||
  16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
 | 
			
		||||
 | 
			
		||||
@@ -40,40 +44,63 @@ if [ $? -ne 0 ]; then
 | 
			
		||||
  exit
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
function clean_container() {
 | 
			
		||||
  container=$1
 | 
			
		||||
function run_lxc_clean() {
 | 
			
		||||
  local container=$1
 | 
			
		||||
  header_info
 | 
			
		||||
  name=$(pct exec "$container" hostname)
 | 
			
		||||
  echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n"
 | 
			
		||||
  pct exec "$container" -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update"
 | 
			
		||||
 | 
			
		||||
  pct exec "$container" -- bash -c '
 | 
			
		||||
    BL="\033[36m"; GN="\033[1;92m"; CL="\033[m"
 | 
			
		||||
    name=$(hostname)
 | 
			
		||||
    if [ -e /etc/alpine-release ]; then
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Cleaning $name (Alpine)${CL}\n"
 | 
			
		||||
      apk cache clean
 | 
			
		||||
      find /var/log -type f -delete 2>/dev/null
 | 
			
		||||
      find /tmp -mindepth 1 -delete 2>/dev/null
 | 
			
		||||
      apk update
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Cleaning $name (Debian/Ubuntu)${CL}\n"
 | 
			
		||||
      find /var/cache -type f -delete 2>/dev/null
 | 
			
		||||
      find /var/log -type f -delete 2>/dev/null
 | 
			
		||||
      find /tmp -mindepth 1 -delete 2>/dev/null
 | 
			
		||||
      apt-get -y --purge autoremove
 | 
			
		||||
      apt-get -y autoclean
 | 
			
		||||
      rm -rf /var/lib/apt/lists/*
 | 
			
		||||
      apt-get update
 | 
			
		||||
    fi
 | 
			
		||||
  '
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for container in $(pct list | awk '{if(NR>1) print $1}'); do
 | 
			
		||||
  if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then
 | 
			
		||||
    header_info
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}"
 | 
			
		||||
    sleep 1
 | 
			
		||||
  else
 | 
			
		||||
    continue
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  os=$(pct config "$container" | awk '/^ostype/ {print $2}')
 | 
			
		||||
    if [ "$os" != "debian" ] && [ "$os" != "ubuntu" ]; then
 | 
			
		||||
  # Supported: debian, ubuntu, alpine
 | 
			
		||||
  if [ "$os" != "debian" ] && [ "$os" != "ubuntu" ] && [ "$os" != "alpine" ]; then
 | 
			
		||||
    header_info
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is not Debian or Ubuntu ${CL} \n"
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Skipping ${RD}$container is not Debian, Ubuntu or Alpine${CL} \n"
 | 
			
		||||
    sleep 1
 | 
			
		||||
    continue
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  status=$(pct status "$container")
 | 
			
		||||
  template=$(pct config "$container" | grep -q "template:" && echo "true" || echo "false")
 | 
			
		||||
 | 
			
		||||
  if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
 | 
			
		||||
    pct start "$container"
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n"
 | 
			
		||||
    sleep 5
 | 
			
		||||
      clean_container "$container"
 | 
			
		||||
    run_lxc_clean "$container"
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n"
 | 
			
		||||
    pct shutdown "$container" &
 | 
			
		||||
  elif [ "$status" == "status: running" ]; then
 | 
			
		||||
      clean_container "$container"
 | 
			
		||||
    fi
 | 
			
		||||
    run_lxc_clean "$container"
 | 
			
		||||
  fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,47 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# License: MIT
 | 
			
		||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
 | 
			
		||||
function header_info() {
 | 
			
		||||
  clear
 | 
			
		||||
  cat <<"EOF"
 | 
			
		||||
   ________                    __   _  ________
 | 
			
		||||
  / ____/ /__  ____ _____     / /  | |/ / ____/
 | 
			
		||||
 / /   / / _ \/ __ `/ __ \   / /   |   / /
 | 
			
		||||
/ /___/ /  __/ /_/ / / / /  / /___/   / /___
 | 
			
		||||
\____/_/\___/\__,_/_/ /_/  /_____/_/|_\____/
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
}
 | 
			
		||||
BL=$(echo "\033[36m")
 | 
			
		||||
GN=$(echo "\033[1;92m")
 | 
			
		||||
CL=$(echo "\033[m")
 | 
			
		||||
name=$(hostname)
 | 
			
		||||
header_info
 | 
			
		||||
echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n"
 | 
			
		||||
cache=$(find /var/cache/ -type f)
 | 
			
		||||
if [[ -z "$cache" ]]; then
 | 
			
		||||
  echo -e "It appears there are no cached files on your system. \n"
 | 
			
		||||
  sleep 2
 | 
			
		||||
else
 | 
			
		||||
  find /var/cache -type f -delete
 | 
			
		||||
  echo "Successfully Removed Cache"
 | 
			
		||||
  sleep 2
 | 
			
		||||
fi
 | 
			
		||||
header_info
 | 
			
		||||
echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n"
 | 
			
		||||
logs=$(find /var/log/ -type f)
 | 
			
		||||
if [[ -z "$logs" ]]; then
 | 
			
		||||
  echo -e "It appears there are no logs on your system. \n"
 | 
			
		||||
  sleep 2
 | 
			
		||||
else
 | 
			
		||||
  find /var/log -type f -delete
 | 
			
		||||
  echo "Successfully Removed Logs"
 | 
			
		||||
  sleep 2
 | 
			
		||||
fi
 | 
			
		||||
header_info
 | 
			
		||||
echo -e "${BL}[Info]${GN} Cleaning $name${CL} \n"
 | 
			
		||||
echo -e "${GN}Populating apt lists${CL} \n"
 | 
			
		||||
@@ -1,10 +1,6 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
 | 
			
		||||
set -o pipefail
 | 
			
		||||
set -eEuo pipefail
 | 
			
		||||
 | 
			
		||||
function header_info() {
 | 
			
		||||
  clear
 | 
			
		||||
@@ -17,81 +13,177 @@ function header_info() {
 | 
			
		||||
                    /____/
 | 
			
		||||
EOF
 | 
			
		||||
}
 | 
			
		||||
set -eEuo pipefail
 | 
			
		||||
BL=$(echo "\033[36m")
 | 
			
		||||
RD=$(echo "\033[01;31m")
 | 
			
		||||
CM='\xE2\x9C\x94\033'
 | 
			
		||||
GN=$(echo "\033[1;92m")
 | 
			
		||||
CL=$(echo "\033[m")
 | 
			
		||||
 | 
			
		||||
BL="\033[36m"
 | 
			
		||||
RD="\033[01;31m"
 | 
			
		||||
GN="\033[1;92m"
 | 
			
		||||
CL="\033[m"
 | 
			
		||||
 | 
			
		||||
LOGFILE="/var/log/fstrim.log"
 | 
			
		||||
touch "$LOGFILE"
 | 
			
		||||
chmod 600 "$LOGFILE"
 | 
			
		||||
echo -e "\n----- $(date '+%Y-%m-%d %H:%M:%S') | fstrim Run by $(whoami) on $(hostname) -----" >>"$LOGFILE"
 | 
			
		||||
 | 
			
		||||
header_info
 | 
			
		||||
echo "Loading..."
 | 
			
		||||
 | 
			
		||||
whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
  --title "About fstrim (LXC)" \
 | 
			
		||||
  --msgbox "The 'fstrim' command releases unused blocks back to the storage device. This only makes sense for containers on SSD, NVMe, Thin-LVM, or storage with discard/TRIM support.\n\nIf your root filesystem or container disks are on classic HDDs, thick LVM, or unsupported storage types, running fstrim will have no effect.\n\nRecommended:\n- Use fstrim only on SSD, NVMe, or thin-provisioned storage with discard enabled.\n- For ZFS, ensure 'autotrim=on' is set on your pool.\n" 16 88
 | 
			
		||||
 | 
			
		||||
ROOT_FS=$(df -Th "/" | awk 'NR==2 {print $2}')
 | 
			
		||||
if [ "$ROOT_FS" != "ext4" ]; then
 | 
			
		||||
  echo "Root filesystem is not ext4. Exiting script."
 | 
			
		||||
  exit 1
 | 
			
		||||
  whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
    --title "Warning" \
 | 
			
		||||
    --yesno "Root filesystem is not ext4 ($ROOT_FS).\nContinue anyway?" 12 80 || exit 1
 | 
			
		||||
fi
 | 
			
		||||
whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
  --title "Proxmox VE LXC Filesystem Trim" \
 | 
			
		||||
  --yesno "The LXC containers will undergo the fstrim command. Proceed?" 10 58
 | 
			
		||||
 | 
			
		||||
NODE=$(hostname)
 | 
			
		||||
EXCLUDE_MENU=()
 | 
			
		||||
MSG_MAX_LENGTH=0
 | 
			
		||||
STOPPED_MENU=()
 | 
			
		||||
MAX_NAME_LEN=0
 | 
			
		||||
MAX_STAT_LEN=0
 | 
			
		||||
 | 
			
		||||
while read -r TAG ITEM; do
 | 
			
		||||
  OFFSET=2
 | 
			
		||||
  ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
 | 
			
		||||
  EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
 | 
			
		||||
done < <(pct list | awk 'NR>1')
 | 
			
		||||
# Build arrays with one pct list
 | 
			
		||||
mapfile -t CTLINES < <(pct list | awk 'NR>1')
 | 
			
		||||
 | 
			
		||||
for LINE in "${CTLINES[@]}"; do
 | 
			
		||||
  CTID=$(awk '{print $1}' <<<"$LINE")
 | 
			
		||||
  STATUS=$(awk '{print $2}' <<<"$LINE")
 | 
			
		||||
  NAME=$(awk '{print $3}' <<<"$LINE")
 | 
			
		||||
  ((${#NAME} > MAX_NAME_LEN)) && MAX_NAME_LEN=${#NAME}
 | 
			
		||||
  ((${#STATUS} > MAX_STAT_LEN)) && MAX_STAT_LEN=${#STATUS}
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
FMT="%-${MAX_NAME_LEN}s | %-${MAX_STAT_LEN}s"
 | 
			
		||||
 | 
			
		||||
for LINE in "${CTLINES[@]}"; do
 | 
			
		||||
  CTID=$(awk '{print $1}' <<<"$LINE")
 | 
			
		||||
  STATUS=$(awk '{print $2}' <<<"$LINE")
 | 
			
		||||
  NAME=$(awk '{print $3}' <<<"$LINE")
 | 
			
		||||
  DESC=$(printf "$FMT" "$NAME" "$STATUS")
 | 
			
		||||
  EXCLUDE_MENU+=("$CTID" "$DESC" "OFF")
 | 
			
		||||
  if [[ "$STATUS" == "stopped" ]]; then
 | 
			
		||||
    STOPPED_MENU+=("$CTID" "$DESC" "OFF")
 | 
			
		||||
  fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
excluded_containers_raw=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
  --title "Containers on $NODE" \
 | 
			
		||||
  --checklist "\nSelect containers to skip from trimming:\n" \
 | 
			
		||||
  16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3)
 | 
			
		||||
  20 $((MAX_NAME_LEN + MAX_STAT_LEN + 20)) 12 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3)
 | 
			
		||||
[ $? -ne 0 ] && exit
 | 
			
		||||
read -ra EXCLUDED <<<$(echo "$excluded_containers_raw" | tr -d '"')
 | 
			
		||||
 | 
			
		||||
if [ $? -ne 0 ]; then
 | 
			
		||||
  exit
 | 
			
		||||
TO_START=()
 | 
			
		||||
if [ ${#STOPPED_MENU[@]} -gt 0 ]; then
 | 
			
		||||
  for ((i = 0; i < ${#STOPPED_MENU[@]}; i += 3)); do
 | 
			
		||||
    CTID="${STOPPED_MENU[i]}"
 | 
			
		||||
    DESC="${STOPPED_MENU[i + 1]}"
 | 
			
		||||
    if [[ " ${EXCLUDED[*]} " =~ " $CTID " ]]; then
 | 
			
		||||
      continue
 | 
			
		||||
    fi
 | 
			
		||||
    header_info
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Container $CTID ($DESC) is currently stopped.${CL}"
 | 
			
		||||
    read -rp "Temporarily start for fstrim? [y/N]: " answer
 | 
			
		||||
    if [[ "$answer" =~ ^[Yy]$ ]]; then
 | 
			
		||||
      TO_START+=("$CTID")
 | 
			
		||||
    fi
 | 
			
		||||
  done
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
excluded_containers=$(echo "$excluded_containers_raw" | tr -d '"')
 | 
			
		||||
declare -A WAS_STOPPED
 | 
			
		||||
for ct in "${TO_START[@]}"; do
 | 
			
		||||
  WAS_STOPPED["$ct"]=1
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
function trim_container() {
 | 
			
		||||
  local container=$1
 | 
			
		||||
  local container="$1"
 | 
			
		||||
  local name="$2"
 | 
			
		||||
  header_info
 | 
			
		||||
  echo -e "${BL}[Info]${GN} Trimming ${BL}$container${CL} \n"
 | 
			
		||||
 | 
			
		||||
  local before_trim
 | 
			
		||||
  before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}')
 | 
			
		||||
  echo -e "${RD}Data before trim $before_trim%${CL}"
 | 
			
		||||
  local before_trim after_trim
 | 
			
		||||
  local lv_name="vm-${container}-disk-0"
 | 
			
		||||
  if lvs --noheadings -o lv_name 2>/dev/null | grep -qw "$lv_name"; then
 | 
			
		||||
    before_trim=$(lvs --noheadings -o lv_name,data_percent 2>/dev/null | awk -v ctid="$lv_name" '$1 == ctid {gsub(/%/, "", $2); print $2}')
 | 
			
		||||
    [[ -n "$before_trim" ]] && echo -e "${RD}Data before trim $before_trim%${CL}" || echo -e "${RD}Data before trim: not available${CL}"
 | 
			
		||||
  else
 | 
			
		||||
    before_trim=""
 | 
			
		||||
    echo -e "${RD}Data before trim: not available (non-LVM storage)${CL}"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  pct fstrim "$container"
 | 
			
		||||
  local fstrim_output
 | 
			
		||||
  fstrim_output=$(pct fstrim "$container" 2>&1)
 | 
			
		||||
  if echo "$fstrim_output" | grep -qi "not supported"; then
 | 
			
		||||
    echo -e "${RD}fstrim isnt supported on this storage!${CL}"
 | 
			
		||||
  elif echo "$fstrim_output" | grep -Eq '([0-9]+(\.[0-9]+)?\s*[KMGT]?B)'; then
 | 
			
		||||
    echo -e "${GN}fstrim result: $fstrim_output${CL}"
 | 
			
		||||
  else
 | 
			
		||||
    echo -e "${RD}fstrim result: $fstrim_output${CL}"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  local after_trim
 | 
			
		||||
  after_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}')
 | 
			
		||||
  echo -e "${GN}Data after trim $after_trim%${CL}"
 | 
			
		||||
  if lvs --noheadings -o lv_name 2>/dev/null | grep -qw "$lv_name"; then
 | 
			
		||||
    after_trim=$(lvs --noheadings -o lv_name,data_percent 2>/dev/null | awk -v ctid="$lv_name" '$1 == ctid {gsub(/%/, "", $2); print $2}')
 | 
			
		||||
    [[ -n "$after_trim" ]] && echo -e "${GN}Data after trim $after_trim%${CL}" || echo -e "${GN}Data after trim: not available${CL}"
 | 
			
		||||
  else
 | 
			
		||||
    after_trim=""
 | 
			
		||||
    echo -e "${GN}Data after trim: not available (non-LVM storage)${CL}"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  sleep 1.5
 | 
			
		||||
  # Logging
 | 
			
		||||
  echo "$(date '+%Y-%m-%d %H:%M:%S') | CTID=$container | Name=$name | Before=${before_trim:-N/A}% | After=${after_trim:-N/A}% | fstrim: $fstrim_output" >>"$LOGFILE"
 | 
			
		||||
  sleep 0.5
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for container in $(pct list | awk '{if(NR>1) print $1}'); do
 | 
			
		||||
  if [[ " ${excluded_containers} " =~ " $container " ]]; then
 | 
			
		||||
for LINE in "${CTLINES[@]}"; do
 | 
			
		||||
  CTID=$(awk '{print $1}' <<<"$LINE")
 | 
			
		||||
  STATUS=$(awk '{print $2}' <<<"$LINE")
 | 
			
		||||
  NAME=$(awk '{print $3}' <<<"$LINE")
 | 
			
		||||
  if [[ " ${EXCLUDED[*]} " =~ " $CTID " ]]; then
 | 
			
		||||
    header_info
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}"
 | 
			
		||||
    sleep 1
 | 
			
		||||
  else
 | 
			
		||||
    template=$(pct config "$container" | grep -q "template:" && echo "true" || echo "false")
 | 
			
		||||
    if [ "$template" == "true" ]; then
 | 
			
		||||
      header_info
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Skipping ${container} ${RD}$container is a template ${CL} \n"
 | 
			
		||||
      sleep 1
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Skipping $CTID ($NAME, excluded)${CL}"
 | 
			
		||||
    sleep 0.5
 | 
			
		||||
    continue
 | 
			
		||||
  fi
 | 
			
		||||
    trim_container "$container"
 | 
			
		||||
  if pct config "$CTID" | grep -q "template:"; then
 | 
			
		||||
    header_info
 | 
			
		||||
    echo -e "${BL}[Info]${GN} Skipping $CTID ($NAME, template)${CL}\n"
 | 
			
		||||
    sleep 0.5
 | 
			
		||||
    continue
 | 
			
		||||
  fi
 | 
			
		||||
  if [[ "$STATUS" != "running" ]]; then
 | 
			
		||||
    if [[ -n "${WAS_STOPPED[$CTID]:-}" ]]; then
 | 
			
		||||
      header_info
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Starting $CTID ($NAME) for trim...${CL}"
 | 
			
		||||
      pct start "$CTID"
 | 
			
		||||
      sleep 2
 | 
			
		||||
    else
 | 
			
		||||
      header_info
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Skipping $CTID ($NAME, not running, not selected)${CL}"
 | 
			
		||||
      sleep 0.5
 | 
			
		||||
      continue
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  trim_container "$CTID" "$NAME"
 | 
			
		||||
 | 
			
		||||
  if [[ -n "${WAS_STOPPED[$CTID]:-}" ]]; then
 | 
			
		||||
    read -rp "Stop LXC $CTID ($NAME) again after trim? [Y/n]: " answer
 | 
			
		||||
    if [[ ! "$answer" =~ ^[Nn]$ ]]; then
 | 
			
		||||
      header_info
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Stopping $CTID ($NAME) again...${CL}"
 | 
			
		||||
      pct stop "$CTID"
 | 
			
		||||
      sleep 1
 | 
			
		||||
    else
 | 
			
		||||
      header_info
 | 
			
		||||
      echo -e "${BL}[Info]${GN} Leaving $CTID ($NAME) running as requested.${CL}"
 | 
			
		||||
      sleep 1
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
wait
 | 
			
		||||
header_info
 | 
			
		||||
echo -e "${GN}Finished, LXC Containers Trimmed.${CL} \n"
 | 
			
		||||
echo -e "${BL}If you want to see the complete log: cat $LOGFILE${CL}"
 | 
			
		||||
exit 0
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Creates a systemd service to disable NIC offloading features for Intel e1000e interfaces
 | 
			
		||||
# Creates a systemd service to disable NIC offloading features for Intel e1000e and e1000 interfaces
 | 
			
		||||
# Author: rcastley
 | 
			
		||||
# License: MIT
 | 
			
		||||
 | 
			
		||||
@@ -19,8 +19,8 @@ INFO="${TAB}ℹ️${TAB}${CL}"
 | 
			
		||||
WARN="${TAB}⚠️${TAB}${CL}"
 | 
			
		||||
 | 
			
		||||
function header_info {
 | 
			
		||||
  clear
 | 
			
		||||
  cat <<"EOF"
 | 
			
		||||
clear
 | 
			
		||||
cat <<"EOF"
 | 
			
		||||
 | 
			
		||||
    _   ____________   ____  __________                ___                ____  _            __    __
 | 
			
		||||
   / | / /  _/ ____/  / __ \/ __/ __/ /___  ____ _____/ (_)___  ____ _   / __ \(_)________ _/ /_  / /__  _____
 | 
			
		||||
@@ -28,6 +28,7 @@ function header_info {
 | 
			
		||||
 / /|  // // /___   / /_/ / __/ __/ / /_/ / /_/ / /_/ / / / / / /_/ /  / /_/ / (__  ) /_/ / /_/ / /  __/ /
 | 
			
		||||
/_/ |_/___/\____/   \____/_/ /_/ /_/\____/\__,_/\__,_/_/_/ /_/\__, /  /_____/_/____/\__,_/_.___/_/\___/_/
 | 
			
		||||
                                                             /____/
 | 
			
		||||
Enhanced version supporting both e1000e and e1000 drivers
 | 
			
		||||
 | 
			
		||||
EOF
 | 
			
		||||
}
 | 
			
		||||
@@ -52,36 +53,36 @@ if ! command -v ethtool >/dev/null 2>&1; then
 | 
			
		||||
    msg_ok "ethtool installed successfully"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Get list of network interfaces using Intel e1000e driver
 | 
			
		||||
# Get list of network interfaces using Intel e1000e or e1000 drivers
 | 
			
		||||
INTERFACES=()
 | 
			
		||||
COUNT=0
 | 
			
		||||
 | 
			
		||||
msg_info "Searching for Intel e1000e interfaces"
 | 
			
		||||
msg_info "Searching for Intel e1000e and e1000 interfaces"
 | 
			
		||||
 | 
			
		||||
for device in /sys/class/net/*; do
 | 
			
		||||
    interface="$(basename "$device")"  # or adjust the rest of the usages below, as mostly you'll use the path anyway
 | 
			
		||||
    # Skip loopback interface and virtual interfaces
 | 
			
		||||
    if [[ "$interface" != "lo" ]] && [[ ! "$interface" =~ ^(tap|fwbr|veth|vmbr|bonding_masters) ]]; then
 | 
			
		||||
        # Check if the interface uses the e1000e driver
 | 
			
		||||
        # Check if the interface uses the e1000e or e1000 driver
 | 
			
		||||
        driver=$(basename $(readlink -f /sys/class/net/$interface/device/driver 2>/dev/null) 2>/dev/null)
 | 
			
		||||
        
 | 
			
		||||
        if [[ "$driver" == "e1000e" ]]; then
 | 
			
		||||
        if [[ "$driver" == "e1000e" ]] || [[ "$driver" == "e1000" ]]; then
 | 
			
		||||
            # Get MAC address for additional identification
 | 
			
		||||
            mac=$(cat /sys/class/net/$interface/address 2>/dev/null)
 | 
			
		||||
            INTERFACES+=("$interface" "Intel e1000e NIC ($mac)")
 | 
			
		||||
            INTERFACES+=("$interface" "Intel $driver NIC ($mac)")
 | 
			
		||||
            ((COUNT++))
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Check if any Intel e1000e interfaces were found
 | 
			
		||||
# Check if any Intel e1000e/e1000 interfaces were found
 | 
			
		||||
if [ ${#INTERFACES[@]} -eq 0 ]; then
 | 
			
		||||
    whiptail --title "Error" --msgbox "No Intel e1000e network interfaces found!" 10 60
 | 
			
		||||
    msg_error "No Intel e1000e network interfaces found! Exiting."
 | 
			
		||||
    whiptail --title "Error" --msgbox "No Intel e1000e or e1000 network interfaces found!" 10 60
 | 
			
		||||
    msg_error "No Intel e1000e or e1000 network interfaces found! Exiting."
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
msg_ok "Found ${BL}$COUNT${GN} Intel e1000e interfaces"
 | 
			
		||||
msg_ok "Found ${BL}$COUNT${GN} Intel e1000e/e1000 interfaces"
 | 
			
		||||
 | 
			
		||||
# Create a checklist for interface selection with all interfaces initially checked
 | 
			
		||||
INTERFACES_CHECKLIST=()
 | 
			
		||||
@@ -90,8 +91,8 @@ for ((i=0; i<${#INTERFACES[@]}; i+=2)); do
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Show interface selection checklist
 | 
			
		||||
SELECTED_INTERFACES=$(whiptail --backtitle "Intel e1000e NIC Offloading Disabler" --title "Network Interfaces" \
 | 
			
		||||
                    --separate-output --checklist "Select Intel e1000e network interfaces\n(Space to toggle, Enter to confirm):" 15 80 6 \
 | 
			
		||||
SELECTED_INTERFACES=$(whiptail --backtitle "Intel e1000e/e1000 NIC Offloading Disabler" --title "Network Interfaces" \
 | 
			
		||||
    --separate-output --checklist "Select Intel e1000e/e1000 network interfaces\n(Space to toggle, Enter to confirm):" 15 80 6 \
 | 
			
		||||
    "${INTERFACES_CHECKLIST[@]}" 3>&1 1>&2 2>&3)
 | 
			
		||||
 | 
			
		||||
exitstatus=$?
 | 
			
		||||
@@ -112,21 +113,23 @@ readarray -t INTERFACE_ARRAY <<< "$SELECTED_INTERFACES"
 | 
			
		||||
# Show the number of selected interfaces
 | 
			
		||||
INTERFACE_COUNT=${#INTERFACE_ARRAY[@]}
 | 
			
		||||
 | 
			
		||||
# Print selected interfaces
 | 
			
		||||
# Print selected interfaces with their driver types
 | 
			
		||||
for iface in "${INTERFACE_ARRAY[@]}"; do
 | 
			
		||||
    msg_ok "Selected interface: ${BL}$iface${CL}"
 | 
			
		||||
    driver=$(basename $(readlink -f /sys/class/net/$iface/device/driver 2>/dev/null) 2>/dev/null)
 | 
			
		||||
    msg_ok "Selected interface: ${BL}$iface${GN} (${BL}$driver${GN})"
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Ask for confirmation with the list of selected interfaces
 | 
			
		||||
CONFIRMATION_MSG="You have selected the following interface(s):\n\n"
 | 
			
		||||
for iface in "${INTERFACE_ARRAY[@]}"; do
 | 
			
		||||
    SPEED=$(cat /sys/class/net/$iface/speed 2>/dev/null)
 | 
			
		||||
    SPEED=$(cat /sys/class/net/$iface/speed 2>/dev/null || echo "Unknown")
 | 
			
		||||
    MAC=$(cat /sys/class/net/$iface/address 2>/dev/null)
 | 
			
		||||
    CONFIRMATION_MSG+="- $iface (MAC: $MAC, Speed: ${SPEED}Mbps)\n"
 | 
			
		||||
    DRIVER=$(basename $(readlink -f /sys/class/net/$iface/device/driver 2>/dev/null) 2>/dev/null)
 | 
			
		||||
    CONFIRMATION_MSG+="- $iface (Driver: $DRIVER, MAC: $MAC, Speed: ${SPEED}Mbps)\n"
 | 
			
		||||
done
 | 
			
		||||
CONFIRMATION_MSG+="\nThis will create systemd service(s) to disable offloading features.\n\nProceed?"
 | 
			
		||||
 | 
			
		||||
if ! whiptail --backtitle "Intel e1000e NIC Offloading Disabler" --title "Confirmation" \
 | 
			
		||||
if ! whiptail --backtitle "Intel e1000e/e1000 NIC Offloading Disabler" --title "Confirmation" \
 | 
			
		||||
    --yesno "$CONFIRMATION_MSG" 20 80; then
 | 
			
		||||
    msg_info "User canceled. Exiting."
 | 
			
		||||
    exit 0
 | 
			
		||||
@@ -134,22 +137,25 @@ fi
 | 
			
		||||
 | 
			
		||||
# Loop through all selected interfaces and create services for each
 | 
			
		||||
for SELECTED_INTERFACE in "${INTERFACE_ARRAY[@]}"; do
 | 
			
		||||
    # Get the driver type for this specific interface
 | 
			
		||||
    DRIVER=$(basename $(readlink -f /sys/class/net/$SELECTED_INTERFACE/device/driver 2>/dev/null) 2>/dev/null)
 | 
			
		||||
    
 | 
			
		||||
    # Create service name for this interface
 | 
			
		||||
    SERVICE_NAME="disable-nic-offload-$SELECTED_INTERFACE.service"
 | 
			
		||||
    SERVICE_PATH="/etc/systemd/system/$SERVICE_NAME"
 | 
			
		||||
    
 | 
			
		||||
    # Create the service file with e1000e specific optimizations
 | 
			
		||||
    msg_info "Creating systemd service for interface: ${BL}$SELECTED_INTERFACE${YW}"
 | 
			
		||||
    # Create the service file with driver-specific optimizations
 | 
			
		||||
    msg_info "Creating systemd service for interface: ${BL}$SELECTED_INTERFACE${YW} (${BL}$DRIVER${YW})"
 | 
			
		||||
    
 | 
			
		||||
    # Start with the common part of the service file
 | 
			
		||||
    cat > "$SERVICE_PATH" << EOF
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Disable NIC offloading for Intel e1000e interface $SELECTED_INTERFACE
 | 
			
		||||
Description=Disable NIC offloading for Intel $DRIVER interface $SELECTED_INTERFACE
 | 
			
		||||
After=network.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=oneshot
 | 
			
		||||
# Disable all offloading features for Intel e1000e
 | 
			
		||||
# Disable all offloading features for Intel $DRIVER
 | 
			
		||||
ExecStart=/sbin/ethtool -K $SELECTED_INTERFACE gso off gro off tso off tx off rx off rxvlan off txvlan off sg off
 | 
			
		||||
RemainAfterExit=true
 | 
			
		||||
 | 
			
		||||
@@ -176,7 +182,7 @@ EOF
 | 
			
		||||
        # Enable the service to start on boot
 | 
			
		||||
        systemctl enable "$SERVICE_NAME"
 | 
			
		||||
        echo "100"; sleep 0.2
 | 
			
		||||
    } | whiptail --backtitle "Intel e1000e NIC Offloading Disabler" --gauge "Configuring service for $SELECTED_INTERFACE..." 10 80 0
 | 
			
		||||
    } | whiptail --backtitle "Intel e1000e/e1000 NIC Offloading Disabler" --gauge "Configuring service for $SELECTED_INTERFACE..." 10 80 0
 | 
			
		||||
 | 
			
		||||
    # Individual service status
 | 
			
		||||
    if systemctl is-active --quiet "$SERVICE_NAME"; then
 | 
			
		||||
@@ -192,7 +198,7 @@ EOF
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Show individual service results
 | 
			
		||||
    msg_ok "Service for ${BL}$SELECTED_INTERFACE${GN} created and enabled!"
 | 
			
		||||
    msg_ok "Service for ${BL}$SELECTED_INTERFACE${GN} (${BL}$DRIVER${GN}) created and enabled!"
 | 
			
		||||
    msg_info "${TAB}Service: ${BL}$SERVICE_NAME${YW}"
 | 
			
		||||
    msg_info "${TAB}Status: ${BL}$SERVICE_STATUS${YW}"
 | 
			
		||||
    msg_info "${TAB}Start on boot: ${BL}$BOOT_STATUS${YW}"
 | 
			
		||||
@@ -204,6 +210,8 @@ SUMMARY_MSG+="Configured Interfaces:\n"
 | 
			
		||||
 | 
			
		||||
for iface in "${INTERFACE_ARRAY[@]}"; do
 | 
			
		||||
    SERVICE_NAME="disable-nic-offload-$iface.service"
 | 
			
		||||
    DRIVER=$(basename $(readlink -f /sys/class/net/$iface/device/driver 2>/dev/null) 2>/dev/null)
 | 
			
		||||
    
 | 
			
		||||
    if systemctl is-active --quiet "$SERVICE_NAME"; then
 | 
			
		||||
        SVC_STATUS="Active"
 | 
			
		||||
    else
 | 
			
		||||
@@ -216,12 +224,20 @@ for iface in "${INTERFACE_ARRAY[@]}"; do
 | 
			
		||||
        BOOT_SVC_STATUS="Disabled"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    SUMMARY_MSG+="- $iface: $SVC_STATUS, Boot: $BOOT_SVC_STATUS\n"
 | 
			
		||||
    SUMMARY_MSG+="- $iface ($DRIVER): $SVC_STATUS, Boot: $BOOT_SVC_STATUS\n"
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Show summary results
 | 
			
		||||
whiptail --backtitle "Intel e1000e NIC Offloading Disabler" --title "Success" --msgbox "$SUMMARY_MSG" 20 80
 | 
			
		||||
whiptail --backtitle "Intel e1000e/e1000 NIC Offloading Disabler" --title "Success" --msgbox "$SUMMARY_MSG" 22 80
 | 
			
		||||
 | 
			
		||||
msg_ok "Intel e1000e optimization complete for ${#INTERFACE_ARRAY[@]} interface(s)!"
 | 
			
		||||
msg_ok "Intel e1000e/e1000 optimization complete for ${#INTERFACE_ARRAY[@]} interface(s)!"
 | 
			
		||||
 | 
			
		||||
# Show verification commands
 | 
			
		||||
echo ""
 | 
			
		||||
msg_info "Verification commands:"
 | 
			
		||||
for iface in "${INTERFACE_ARRAY[@]}"; do
 | 
			
		||||
    echo -e "${TAB}${BL}ethtool -k $iface${CL} ${YW}# Check offloading status${CL}"
 | 
			
		||||
    echo -e "${TAB}${BL}systemctl status disable-nic-offload-$iface.service${CL} ${YW}# Check service status${CL}"
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 tteck
 | 
			
		||||
# Author: tteck (tteckster)
 | 
			
		||||
# Author: tteckster | MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT
 | 
			
		||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
 | 
			
		||||
@@ -44,9 +44,66 @@ msg_error() {
 | 
			
		||||
  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start_routines() {
 | 
			
		||||
get_pve_version() {
 | 
			
		||||
  local pve_ver
 | 
			
		||||
  pve_ver="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
  echo "$pve_ver"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
get_pve_major_minor() {
 | 
			
		||||
  local ver="$1"
 | 
			
		||||
  local major minor
 | 
			
		||||
  IFS='.' read -r major minor _ <<<"$ver"
 | 
			
		||||
  echo "$major $minor"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
component_exists_in_sources() {
 | 
			
		||||
  local component="$1"
 | 
			
		||||
  grep -h -E "^[^#]*Components:[^#]*\b${component}\b" /etc/apt/sources.list.d/*.sources 2>/dev/null | grep -q .
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main() {
 | 
			
		||||
  header_info
 | 
			
		||||
  echo -e "\nThis script will Perform Post Install Routines.\n"
 | 
			
		||||
  while true; do
 | 
			
		||||
    read -p "Start the Proxmox VE Post Install Script (y/n)? " yn
 | 
			
		||||
    case $yn in
 | 
			
		||||
    [Yy]*) break ;;
 | 
			
		||||
    [Nn]*)
 | 
			
		||||
      clear
 | 
			
		||||
      exit
 | 
			
		||||
      ;;
 | 
			
		||||
    *) echo "Please answer yes or no." ;;
 | 
			
		||||
    esac
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
  local PVE_VERSION PVE_MAJOR PVE_MINOR
 | 
			
		||||
  PVE_VERSION="$(get_pve_version)"
 | 
			
		||||
  read -r PVE_MAJOR PVE_MINOR <<<"$(get_pve_major_minor "$PVE_VERSION")"
 | 
			
		||||
 | 
			
		||||
  if [[ "$PVE_MAJOR" == "8" ]]; then
 | 
			
		||||
    if ((PVE_MINOR < 0 || PVE_MINOR > 9)); then
 | 
			
		||||
      msg_error "Unsupported Proxmox 8 version"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    start_routines_8
 | 
			
		||||
  elif [[ "$PVE_MAJOR" == "9" ]]; then
 | 
			
		||||
    if ((PVE_MINOR != 0)); then
 | 
			
		||||
      msg_error "Only Proxmox 9.0 is currently supported"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    start_routines_9
 | 
			
		||||
  else
 | 
			
		||||
    msg_error "Unsupported Proxmox VE major version: $PVE_MAJOR"
 | 
			
		||||
    echo -e "Supported: 8.0–8.9.x and 9.0"
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start_routines_8() {
 | 
			
		||||
  header_info
 | 
			
		||||
 | 
			
		||||
  # === Bookworm/8.x: .list-Files ===
 | 
			
		||||
  CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SOURCES" --menu "The package manager will use the correct sources to update and install packages on your Proxmox VE server.\n \nCorrect Proxmox VE sources?" 14 58 2 \
 | 
			
		||||
    "yes" " " \
 | 
			
		||||
    "no" " " 3>&2 2>&1 1>&3)
 | 
			
		||||
@@ -61,9 +118,7 @@ EOF
 | 
			
		||||
    echo 'APT::Get::Update::SourceListWarnings::NonFreeFirmware "false";' >/etc/apt/apt.conf.d/no-bookworm-firmware.conf
 | 
			
		||||
    msg_ok "Corrected Proxmox VE Sources"
 | 
			
		||||
    ;;
 | 
			
		||||
  no)
 | 
			
		||||
    msg_error "Selected no to Correcting Proxmox VE Sources"
 | 
			
		||||
    ;;
 | 
			
		||||
  no) msg_error "Selected no to Correcting Proxmox VE Sources" ;;
 | 
			
		||||
  esac
 | 
			
		||||
 | 
			
		||||
  CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-ENTERPRISE" --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n \nDisable 'pve-enterprise' repository?" 14 58 2 \
 | 
			
		||||
@@ -77,9 +132,7 @@ EOF
 | 
			
		||||
EOF
 | 
			
		||||
    msg_ok "Disabled 'pve-enterprise' repository"
 | 
			
		||||
    ;;
 | 
			
		||||
  no)
 | 
			
		||||
    msg_error "Selected no to Disabling 'pve-enterprise' repository"
 | 
			
		||||
    ;;
 | 
			
		||||
  no) msg_error "Selected no to Disabling 'pve-enterprise' repository" ;;
 | 
			
		||||
  esac
 | 
			
		||||
 | 
			
		||||
  CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-NO-SUBSCRIPTION" --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n \nEnable 'pve-no-subscription' repository?" 14 58 2 \
 | 
			
		||||
@@ -93,9 +146,7 @@ deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
 | 
			
		||||
EOF
 | 
			
		||||
    msg_ok "Enabled 'pve-no-subscription' repository"
 | 
			
		||||
    ;;
 | 
			
		||||
  no)
 | 
			
		||||
    msg_error "Selected no to Enabling 'pve-no-subscription' repository"
 | 
			
		||||
    ;;
 | 
			
		||||
  no) msg_error "Selected no to Enabling 'pve-no-subscription' repository" ;;
 | 
			
		||||
  esac
 | 
			
		||||
 | 
			
		||||
  CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories (initially disabled).\n \nCorrect 'ceph package sources?" 14 58 2 \
 | 
			
		||||
@@ -112,9 +163,7 @@ EOF
 | 
			
		||||
EOF
 | 
			
		||||
    msg_ok "Corrected 'ceph package repositories'"
 | 
			
		||||
    ;;
 | 
			
		||||
  no)
 | 
			
		||||
    msg_error "Selected no to Correcting 'ceph package repositories'"
 | 
			
		||||
    ;;
 | 
			
		||||
  no) msg_error "Selected no to Correcting 'ceph package repositories'" ;;
 | 
			
		||||
  esac
 | 
			
		||||
 | 
			
		||||
  CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVETEST" --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pvetest' repository?" 14 58 2 \
 | 
			
		||||
@@ -128,11 +177,336 @@ EOF
 | 
			
		||||
EOF
 | 
			
		||||
    msg_ok "Added 'pvetest' repository"
 | 
			
		||||
    ;;
 | 
			
		||||
  no)
 | 
			
		||||
    msg_error "Selected no to Adding 'pvetest' repository"
 | 
			
		||||
  no) msg_error "Selected no to Adding 'pvetest' repository" ;;
 | 
			
		||||
  esac
 | 
			
		||||
 | 
			
		||||
  post_routines_common
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start_routines_9() {
 | 
			
		||||
  header_info
 | 
			
		||||
 | 
			
		||||
  # check if deb822 Sources (*.sources) exist
 | 
			
		||||
  if find /etc/apt/sources.list.d/ -maxdepth 1 -name '*.sources' | grep -q .; then
 | 
			
		||||
    whiptail --backtitle "Proxmox VE Helper Scripts" --title "Deb822 sources detected" \
 | 
			
		||||
      --msgbox "Modern deb822 sources (*.sources) already exist.\n\nNo changes to sources format required.\n\nYou may still have legacy sources.list or .list files, which you can disable in the next step." 12 65
 | 
			
		||||
  else
 | 
			
		||||
    check_and_disable_legacy_sources() {
 | 
			
		||||
      local LEGACY_COUNT=0
 | 
			
		||||
      local listfile="/etc/apt/sources.list"
 | 
			
		||||
 | 
			
		||||
      # Check sources.list
 | 
			
		||||
      if [[ -f "$listfile" ]] && grep -qE '^\s*deb ' "$listfile"; then
 | 
			
		||||
        ((LEGACY_COUNT++))
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      # Check .list files
 | 
			
		||||
      local list_files
 | 
			
		||||
      list_files=$(find /etc/apt/sources.list.d/ -type f -name "*.list" 2>/dev/null)
 | 
			
		||||
      if [[ -n "$list_files" ]]; then
 | 
			
		||||
        LEGACY_COUNT=$((LEGACY_COUNT + $(echo "$list_files" | wc -l)))
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      if ((LEGACY_COUNT > 0)); then
 | 
			
		||||
        # Show summary to user
 | 
			
		||||
        local MSG="Legacy APT sources found:\n"
 | 
			
		||||
        [[ -f "$listfile" ]] && MSG+=" - /etc/apt/sources.list\n"
 | 
			
		||||
        [[ -n "$list_files" ]] && MSG+="$(echo "$list_files" | sed 's|^| - |')\n"
 | 
			
		||||
        MSG+="\nDo you want to disable (comment out/rename) all legacy sources and use ONLY deb822 .sources format?\n\nRecommended for Proxmox VE 9."
 | 
			
		||||
 | 
			
		||||
        whiptail --backtitle "Proxmox VE Helper Scripts" --title "Disable legacy sources?" \
 | 
			
		||||
          --yesno "$MSG" 18 80
 | 
			
		||||
        if [[ $? -eq 0 ]]; then
 | 
			
		||||
          # Backup and disable sources.list
 | 
			
		||||
          if [[ -f "$listfile" ]] && grep -qE '^\s*deb ' "$listfile"; then
 | 
			
		||||
            cp "$listfile" "$listfile.bak"
 | 
			
		||||
            sed -i '/^\s*deb /s/^/# Disabled by Proxmox Helper Script /' "$listfile"
 | 
			
		||||
            msg_ok "Disabled entries in sources.list (backup: sources.list.bak)"
 | 
			
		||||
          fi
 | 
			
		||||
          # Rename all .list files to .list.bak
 | 
			
		||||
          if [[ -n "$list_files" ]]; then
 | 
			
		||||
            while IFS= read -r f; do
 | 
			
		||||
              mv "$f" "$f.bak"
 | 
			
		||||
            done <<<"$list_files"
 | 
			
		||||
            msg_ok "Renamed legacy .list files to .bak"
 | 
			
		||||
          fi
 | 
			
		||||
        else
 | 
			
		||||
          msg_error "Kept legacy sources as-is (may cause APT warnings)"
 | 
			
		||||
        fi
 | 
			
		||||
      fi
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    check_and_disable_legacy_sources
 | 
			
		||||
    # === Trixie/9.x: deb822 .sources ===
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SOURCES" --menu \
 | 
			
		||||
      "The package manager will use the correct sources to update and install packages on your Proxmox VE 9 server.\n\nMigrate to deb822 sources format?" 14 58 2 \
 | 
			
		||||
      "yes" " " \
 | 
			
		||||
      "no" " " 3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    yes)
 | 
			
		||||
      msg_info "Correcting Proxmox VE Sources (deb822)"
 | 
			
		||||
      # remove all existing .list files
 | 
			
		||||
      rm -f /etc/apt/sources.list.d/*.list
 | 
			
		||||
      # remove bookworm and proxmox entries from sources.list
 | 
			
		||||
      sed -i '/proxmox/d;/bookworm/d' /etc/apt/sources.list || true
 | 
			
		||||
      # Create new deb822 sources
 | 
			
		||||
      cat >/etc/apt/sources.list.d/debian.sources <<EOF
 | 
			
		||||
Types: deb
 | 
			
		||||
URIs: http://deb.debian.org/debian
 | 
			
		||||
Suites: trixie
 | 
			
		||||
Components: main contrib
 | 
			
		||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
 | 
			
		||||
 | 
			
		||||
Types: deb
 | 
			
		||||
URIs: http://security.debian.org/debian-security
 | 
			
		||||
Suites: trixie-security
 | 
			
		||||
Components: main contrib
 | 
			
		||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
 | 
			
		||||
 | 
			
		||||
Types: deb
 | 
			
		||||
URIs: http://deb.debian.org/debian
 | 
			
		||||
Suites: trixie-updates
 | 
			
		||||
Components: main contrib
 | 
			
		||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
 | 
			
		||||
EOF
 | 
			
		||||
      msg_ok "Corrected Proxmox VE 9 (Trixie) Sources"
 | 
			
		||||
      ;;
 | 
			
		||||
    no) msg_error "Selected no to Correcting Proxmox VE Sources" ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # ---- PVE-ENTERPRISE ----
 | 
			
		||||
  if component_exists_in_sources "pve-enterprise"; then
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
      --title "PVE-ENTERPRISE" \
 | 
			
		||||
      --menu "'pve-enterprise' repository already exists.\n\nWhat do you want to do?" 14 58 2 \
 | 
			
		||||
      "keep" "Keep as is" \
 | 
			
		||||
      "disable" "Comment out (disable) this repo" \
 | 
			
		||||
      "delete" "Delete this repo file" \
 | 
			
		||||
      3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    keep)
 | 
			
		||||
      msg_ok "Kept 'pve-enterprise' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    disable)
 | 
			
		||||
      msg_info "Disabling (commenting) 'pve-enterprise' repository"
 | 
			
		||||
      # Comment out every non-comment line in the file that has 'pve-enterprise' in Components
 | 
			
		||||
      for file in /etc/apt/sources.list.d/*.sources; do
 | 
			
		||||
        if grep -q "Components:.*pve-enterprise" "$file"; then
 | 
			
		||||
          sed -i '/^\s*Types:/,/^$/s/^\([^#].*\)$/# \1/' "$file"
 | 
			
		||||
        fi
 | 
			
		||||
      done
 | 
			
		||||
      msg_ok "Disabled 'pve-enterprise' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    delete)
 | 
			
		||||
      msg_info "Deleting 'pve-enterprise' repository file"
 | 
			
		||||
      for file in /etc/apt/sources.list.d/*.sources; do
 | 
			
		||||
        if grep -q "Components:.*pve-enterprise" "$file"; then
 | 
			
		||||
          rm -f "$file"
 | 
			
		||||
        fi
 | 
			
		||||
      done
 | 
			
		||||
      msg_ok "Deleted 'pve-enterprise' repository file"
 | 
			
		||||
      ;;
 | 
			
		||||
    esac
 | 
			
		||||
  else
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
      --title "PVE-ENTERPRISE" \
 | 
			
		||||
      --menu "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription.\n\nAdd 'pve-enterprise' repository (deb822)?" 14 58 2 \
 | 
			
		||||
      "no" " " \
 | 
			
		||||
      "yes" " " \
 | 
			
		||||
      --default-item "no" \
 | 
			
		||||
      3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    yes)
 | 
			
		||||
      msg_info "Adding 'pve-enterprise' repository (deb822)"
 | 
			
		||||
      cat >/etc/apt/sources.list.d/pve-enterprise.sources <<EOF
 | 
			
		||||
Types: deb
 | 
			
		||||
URIs: https://enterprise.proxmox.com/debian/pve
 | 
			
		||||
Suites: trixie
 | 
			
		||||
Components: pve-enterprise
 | 
			
		||||
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
 | 
			
		||||
EOF
 | 
			
		||||
      msg_ok "Added 'pve-enterprise' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    no) msg_error "Selected no to Adding 'pve-enterprise' repository" ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # ---- CEPH-ENTERPRISE ----
 | 
			
		||||
  if grep -q "enterprise.proxmox.com.*ceph" /etc/apt/sources.list.d/*.sources 2>/dev/null; then
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
      --title "CEPH-ENTERPRISE" \
 | 
			
		||||
      --menu "'ceph enterprise' repository already exists.\n\nWhat do you want to do?" 14 58 2 \
 | 
			
		||||
      "keep" "Keep as is" \
 | 
			
		||||
      "disable" "Comment out (disable) this repo" \
 | 
			
		||||
      "delete" "Delete this repo file" \
 | 
			
		||||
      3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    keep)
 | 
			
		||||
      msg_ok "Kept 'ceph enterprise' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    disable)
 | 
			
		||||
      msg_info "Disabling (commenting) 'ceph enterprise' repository"
 | 
			
		||||
      for file in /etc/apt/sources.list.d/*.sources; do
 | 
			
		||||
        if grep -q "enterprise.proxmox.com.*ceph" "$file"; then
 | 
			
		||||
          sed -i '/^\s*Types:/,/^$/s/^\([^#].*\)$/# \1/' "$file"
 | 
			
		||||
        fi
 | 
			
		||||
      done
 | 
			
		||||
      msg_ok "Disabled 'ceph enterprise' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    delete)
 | 
			
		||||
      msg_info "Deleting 'ceph enterprise' repository file"
 | 
			
		||||
      for file in /etc/apt/sources.list.d/*.sources; do
 | 
			
		||||
        if grep -q "enterprise.proxmox.com.*ceph" "$file"; then
 | 
			
		||||
          rm -f "$file"
 | 
			
		||||
        fi
 | 
			
		||||
      done
 | 
			
		||||
      msg_ok "Deleted 'ceph enterprise' repository file"
 | 
			
		||||
      ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # ---- PVE-NO-SUBSCRIPTION ----
 | 
			
		||||
  REPO_FILE=""
 | 
			
		||||
  REPO_ACTIVE=0
 | 
			
		||||
  REPO_COMMENTED=0
 | 
			
		||||
  for file in /etc/apt/sources.list.d/*.sources; do
 | 
			
		||||
    if grep -q "Components:.*pve-no-subscription" "$file"; then
 | 
			
		||||
      REPO_FILE="$file"
 | 
			
		||||
      if grep -E '^[^#]*Components:.*pve-no-subscription' "$file" >/dev/null; then
 | 
			
		||||
        REPO_ACTIVE=1
 | 
			
		||||
      elif grep -E '^#.*Components:.*pve-no-subscription' "$file" >/dev/null; then
 | 
			
		||||
        REPO_COMMENTED=1
 | 
			
		||||
      fi
 | 
			
		||||
      break
 | 
			
		||||
    fi
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
  if [[ "$REPO_ACTIVE" -eq 1 ]]; then
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
      --title "PVE-NO-SUBSCRIPTION" \
 | 
			
		||||
      --menu "'pve-no-subscription' repository is currently ENABLED.\n\nWhat do you want to do?" 14 58 3 \
 | 
			
		||||
      "keep" "Keep as is" \
 | 
			
		||||
      "disable" "Comment out (disable)" \
 | 
			
		||||
      "delete" "Delete repo file" \
 | 
			
		||||
      3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    keep)
 | 
			
		||||
      msg_ok "Kept 'pve-no-subscription' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    disable)
 | 
			
		||||
      msg_info "Disabling (commenting) 'pve-no-subscription' repository"
 | 
			
		||||
      sed -i '/^\s*Types:/,/^$/s/^\([^#].*\)$/# \1/' "$REPO_FILE"
 | 
			
		||||
      msg_ok "Disabled 'pve-no-subscription' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    delete)
 | 
			
		||||
      msg_info "Deleting 'pve-no-subscription' repository file"
 | 
			
		||||
      rm -f "$REPO_FILE"
 | 
			
		||||
      msg_ok "Deleted 'pve-no-subscription' repository file"
 | 
			
		||||
      ;;
 | 
			
		||||
    esac
 | 
			
		||||
 | 
			
		||||
  elif [[ "$REPO_COMMENTED" -eq 1 ]]; then
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
 | 
			
		||||
      --title "PVE-NO-SUBSCRIPTION" \
 | 
			
		||||
      --menu "'pve-no-subscription' repository is currently DISABLED (commented out).\n\nWhat do you want to do?" 14 58 3 \
 | 
			
		||||
      "enable" "Uncomment (enable)" \
 | 
			
		||||
      "keep" "Keep disabled" \
 | 
			
		||||
      "delete" "Delete repo file" \
 | 
			
		||||
      3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    enable)
 | 
			
		||||
      msg_info "Enabling (uncommenting) 'pve-no-subscription' repository"
 | 
			
		||||
      sed -i '/^#\s*Types:/,/^$/s/^#\s*//' "$REPO_FILE"
 | 
			
		||||
      msg_ok "Enabled 'pve-no-subscription' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    keep)
 | 
			
		||||
      msg_ok "Kept 'pve-no-subscription' repository disabled"
 | 
			
		||||
      ;;
 | 
			
		||||
    delete)
 | 
			
		||||
      msg_info "Deleting 'pve-no-subscription' repository file"
 | 
			
		||||
      rm -f "$REPO_FILE"
 | 
			
		||||
      msg_ok "Deleted 'pve-no-subscription' repository file"
 | 
			
		||||
      ;;
 | 
			
		||||
    esac
 | 
			
		||||
  else
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVE-NO-SUBSCRIPTION" \
 | 
			
		||||
      --menu "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE.\n\nAdd 'pve-no-subscription' repository (deb822)?" 14 58 2 \
 | 
			
		||||
      "yes" " " \
 | 
			
		||||
      "no" " " 3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    yes)
 | 
			
		||||
      msg_info "Adding 'pve-no-subscription' repository (deb822)"
 | 
			
		||||
      cat >/etc/apt/sources.list.d/proxmox.sources <<EOF
 | 
			
		||||
Types: deb
 | 
			
		||||
URIs: http://download.proxmox.com/debian/pve
 | 
			
		||||
Suites: trixie
 | 
			
		||||
Components: pve-no-subscription
 | 
			
		||||
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
 | 
			
		||||
EOF
 | 
			
		||||
      msg_ok "Added 'pve-no-subscription' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    no) msg_error "Selected no to Adding 'pve-no-subscription' repository" ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # ---- CEPH ----
 | 
			
		||||
  if component_exists_in_sources "no-subscription"; then
 | 
			
		||||
    msg_ok "'ceph' package repository (no-subscription) already exists (skipped)"
 | 
			
		||||
  else
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" \
 | 
			
		||||
      --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories (deb822).\n\nAdd 'ceph package sources?" 14 58 2 \
 | 
			
		||||
      "yes" " " \
 | 
			
		||||
      "no" " " 3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    yes)
 | 
			
		||||
      msg_info "Adding 'ceph package repositories' (deb822)"
 | 
			
		||||
      cat >/etc/apt/sources.list.d/ceph.sources <<EOF
 | 
			
		||||
Types: deb
 | 
			
		||||
URIs: http://download.proxmox.com/debian/ceph-squid
 | 
			
		||||
Suites: trixie
 | 
			
		||||
Components: no-subscription
 | 
			
		||||
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
 | 
			
		||||
EOF
 | 
			
		||||
      msg_ok "Added 'ceph package repositories'"
 | 
			
		||||
      ;;
 | 
			
		||||
    no)
 | 
			
		||||
      msg_error "Selected no to Adding 'ceph package repositories'"
 | 
			
		||||
      find /etc/apt/sources.list.d/ -type f \( -name "*.sources" -o -name "*.list" \) \
 | 
			
		||||
        -exec sed -i '/enterprise.proxmox.com.*ceph/s/^/# /' {} \;
 | 
			
		||||
      msg_ok "Disabled all Ceph Enterprise repositories"
 | 
			
		||||
      ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # ---- PVETEST ----
 | 
			
		||||
  if component_exists_in_sources "pvetest"; then
 | 
			
		||||
    msg_ok "'pvetest' repository already exists (skipped)"
 | 
			
		||||
  else
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PVETEST" \
 | 
			
		||||
      --menu "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released.\n\nAdd (Disabled) 'pvetest' repository (deb822)?" 14 58 2 \
 | 
			
		||||
      "yes" " " \
 | 
			
		||||
      "no" " " 3>&2 2>&1 1>&3)
 | 
			
		||||
    case $CHOICE in
 | 
			
		||||
    yes)
 | 
			
		||||
      msg_info "Adding 'pvetest' repository (deb822, disabled)"
 | 
			
		||||
      cat >/etc/apt/sources.list.d/pvetest.sources <<EOF
 | 
			
		||||
# Types: deb
 | 
			
		||||
# URIs: http://download.proxmox.com/debian/pve
 | 
			
		||||
# Suites: trixie
 | 
			
		||||
# Components: pvetest
 | 
			
		||||
# Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
 | 
			
		||||
EOF
 | 
			
		||||
      msg_ok "Added 'pvetest' repository"
 | 
			
		||||
      ;;
 | 
			
		||||
    no) msg_error "Selected no to Adding 'pvetest' repository" ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  post_routines_common
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
post_routines_common() {
 | 
			
		||||
  CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \
 | 
			
		||||
    "yes" " " \
 | 
			
		||||
    "no" " " 3>&2 2>&1 1>&3)
 | 
			
		||||
@@ -140,7 +514,7 @@ EOF
 | 
			
		||||
  yes)
 | 
			
		||||
    whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
 | 
			
		||||
    msg_info "Disabling subscription nag"
 | 
			
		||||
    echo "DPkg::Post-Invoke { \"if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then echo 'Removing subscription nag from UI...'; sed -i '/data\.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi\" };" >/etc/apt/apt.conf.d/no-nag-script
 | 
			
		||||
    echo "DPkg::Post-Invoke { \"if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then echo 'Removing subscription nag from UI...'; sed -i '/data\.status/{s/\\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi\" };" >/etc/apt/apt.conf.d/no-nag-script
 | 
			
		||||
    msg_ok "Disabled subscription nag (Delete browser cache)"
 | 
			
		||||
    ;;
 | 
			
		||||
  no)
 | 
			
		||||
@@ -149,8 +523,7 @@ EOF
 | 
			
		||||
    rm /etc/apt/apt.conf.d/no-nag-script 2>/dev/null
 | 
			
		||||
    ;;
 | 
			
		||||
  esac
 | 
			
		||||
  apt --reinstall install proxmox-widget-toolkit &>/dev/null
 | 
			
		||||
 | 
			
		||||
  apt --reinstall install proxmox-widget-toolkit &>/dev/null || msg_error "Widget toolkit reinstall failed"
 | 
			
		||||
  if ! systemctl is-active --quiet pve-ha-lrm; then
 | 
			
		||||
    CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HIGH AVAILABILITY" --menu "Enable high availability?" 10 58 2 \
 | 
			
		||||
      "yes" " " \
 | 
			
		||||
@@ -163,9 +536,7 @@ EOF
 | 
			
		||||
      systemctl enable -q --now corosync
 | 
			
		||||
      msg_ok "Enabled high availability"
 | 
			
		||||
      ;;
 | 
			
		||||
    no)
 | 
			
		||||
      msg_error "Selected no to Enabling high availability"
 | 
			
		||||
      ;;
 | 
			
		||||
    no) msg_error "Selected no to Enabling high availability" ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
@@ -188,14 +559,10 @@ EOF
 | 
			
		||||
        systemctl disable -q --now corosync
 | 
			
		||||
        msg_ok "Disabled Corosync"
 | 
			
		||||
        ;;
 | 
			
		||||
      no)
 | 
			
		||||
        msg_error "Selected no to Disabling Corosync"
 | 
			
		||||
        ;;
 | 
			
		||||
      no) msg_error "Selected no to Disabling Corosync" ;;
 | 
			
		||||
      esac
 | 
			
		||||
      ;;
 | 
			
		||||
    no)
 | 
			
		||||
      msg_error "Selected no to Disabling high availability"
 | 
			
		||||
      ;;
 | 
			
		||||
    no) msg_error "Selected no to Disabling high availability" ;;
 | 
			
		||||
    esac
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
@@ -205,15 +572,24 @@ EOF
 | 
			
		||||
  case $CHOICE in
 | 
			
		||||
  yes)
 | 
			
		||||
    msg_info "Updating Proxmox VE (Patience)"
 | 
			
		||||
    apt-get update &>/dev/null
 | 
			
		||||
    apt-get -y dist-upgrade &>/dev/null
 | 
			
		||||
    apt update &>/dev/null || msg_error "apt update failed"
 | 
			
		||||
    apt -y dist-upgrade &>/dev/null || msg_error "apt dist-upgrade failed"
 | 
			
		||||
    msg_ok "Updated Proxmox VE"
 | 
			
		||||
    ;;
 | 
			
		||||
  no)
 | 
			
		||||
    msg_error "Selected no to Updating Proxmox VE"
 | 
			
		||||
    ;;
 | 
			
		||||
  no) msg_error "Selected no to Updating Proxmox VE" ;;
 | 
			
		||||
  esac
 | 
			
		||||
 | 
			
		||||
  # Final message for all hosts in cluster and browser cache
 | 
			
		||||
  whiptail --backtitle "Proxmox VE Helper Scripts" --title "Post-Install Reminder" --msgbox \
 | 
			
		||||
    "IMPORTANT:
 | 
			
		||||
 | 
			
		||||
If you have multiple Proxmox VE hosts in a cluster, please make sure to run this script on every node individually.
 | 
			
		||||
 | 
			
		||||
After completing these steps, it is strongly recommended to REBOOT your node.
 | 
			
		||||
 | 
			
		||||
After the upgrade or post-install routines, always clear your browser cache or perform a hard reload (Ctrl+Shift+R) before using the Proxmox VE Web UI to avoid UI display issues.
 | 
			
		||||
" 20 80
 | 
			
		||||
 | 
			
		||||
  CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu "\nReboot Proxmox VE now? (recommended)" 11 58 2 \
 | 
			
		||||
    "yes" " " \
 | 
			
		||||
    "no" " " 3>&2 2>&1 1>&3)
 | 
			
		||||
@@ -231,26 +607,4 @@ EOF
 | 
			
		||||
  esac
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header_info
 | 
			
		||||
echo -e "\nThis script will Perform Post Install Routines.\n"
 | 
			
		||||
while true; do
 | 
			
		||||
  read -p "Start the Proxmox VE Post Install Script (y/n)?" yn
 | 
			
		||||
  case $yn in
 | 
			
		||||
  [Yy]*) break ;;
 | 
			
		||||
  [Nn]*)
 | 
			
		||||
    clear
 | 
			
		||||
    exit
 | 
			
		||||
    ;;
 | 
			
		||||
  *) echo "Please answer yes or no." ;;
 | 
			
		||||
  esac
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
 | 
			
		||||
  msg_error "This version of Proxmox Virtual Environment is not supported"
 | 
			
		||||
  echo -e "Requires Proxmox Virtual Environment Version 8.0 or later."
 | 
			
		||||
  echo -e "Exiting..."
 | 
			
		||||
  sleep 2
 | 
			
		||||
  exit
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
start_routines
 | 
			
		||||
main
 | 
			
		||||
 
 | 
			
		||||
@@ -98,11 +98,14 @@ turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs
 | 
			
		||||
 | 
			
		||||
# Setup script environment
 | 
			
		||||
PASS="$(openssl rand -base64 8)"
 | 
			
		||||
CTID=$(pvesh get /cluster/nextid)
 | 
			
		||||
# Prompt user to confirm container ID
 | 
			
		||||
  CTID=$(whiptail --backtitle "Container ID" --title "Choose the Container ID" --inputbox "Enter the conatiner ID..." 8 40 $(pvesh get /cluster/nextid) 3>&1 1>&2 2>&3)
 | 
			
		||||
# Prompt user to confirm Hostname
 | 
			
		||||
  HOST_NAME=$(whiptail --backtitle "Hostname" --title "Choose the Hostname" --inputbox "Enter the containers Hostname..." 8 40 "turnkey-${turnkey}" 3>&1 1>&2 2>&3)
 | 
			
		||||
PCT_OPTIONS="
 | 
			
		||||
    -features keyctl=1,nesting=1
 | 
			
		||||
    -hostname turnkey-${turnkey}
 | 
			
		||||
    -tags proxmox-helper-scripts
 | 
			
		||||
    -hostname $HOST_NAME
 | 
			
		||||
    -tags community-script
 | 
			
		||||
    -onboot 1
 | 
			
		||||
    -cores 2
 | 
			
		||||
    -memory 2048
 | 
			
		||||
@@ -199,6 +202,15 @@ pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/
 | 
			
		||||
# Save password
 | 
			
		||||
echo "TurnKey ${turnkey} password: ${PASS}" >>~/turnkey-${turnkey}.creds # file is located in the Proxmox root directory
 | 
			
		||||
 | 
			
		||||
# If turnkey is "OpenVPN", add access to the tun device
 | 
			
		||||
TUN_DEVICE_REQUIRED=("openvpn") # Setup this way in case future turnkeys also need tun access
 | 
			
		||||
if printf '%s\n' "${TUN_DEVICE_REQUIRED[@]}" | grep -qw "${turnkey}"; then
 | 
			
		||||
  info "${turnkey} requires access to /dev/net/tun on the host. Modifying the container configuration to allow this."
 | 
			
		||||
  echo "lxc.cgroup2.devices.allow: c 10:200 rwm" >> /etc/pve/lxc/${CTID}.conf
 | 
			
		||||
  echo "lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file 0 0" >> /etc/pve/lxc/${CTID}.conf
 | 
			
		||||
  sleep 5
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Start container
 | 
			
		||||
msg "Starting LXC Container..."
 | 
			
		||||
pct start "$CTID"
 | 
			
		||||
@@ -239,4 +251,5 @@ info "Proceed to the LXC console to complete the setup."
 | 
			
		||||
echo
 | 
			
		||||
info "login: root"
 | 
			
		||||
info "password: $PASS"
 | 
			
		||||
info "(credentials also stored in the root user's root directory in the 'turnkey-${turnkey}.creds' file.)"
 | 
			
		||||
echo
 | 
			
		||||
 
 | 
			
		||||
@@ -138,36 +138,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -138,36 +138,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -139,36 +139,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -142,36 +142,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -139,36 +139,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -138,36 +138,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -184,36 +184,37 @@ function msg_error() {
 | 
			
		||||
  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -180,36 +180,37 @@ function msg_error() {
 | 
			
		||||
  echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -139,36 +139,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -147,36 +147,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -134,36 +134,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -137,36 +137,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,552 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
 | 
			
		||||
 | 
			
		||||
function header_info {
 | 
			
		||||
  clear
 | 
			
		||||
  cat <<"EOF"
 | 
			
		||||
   __  ____                __           ___  __ __   _______     _    ____  ___
 | 
			
		||||
  / / / / /_  __  ______  / /___  __   |__ \/ // /  <  / __ \   | |  / /  |/  /
 | 
			
		||||
 / / / / __ \/ / / / __ \/ __/ / / /   __/ / // /_  / / / / /   | | / / /|_/ / 
 | 
			
		||||
/ /_/ / /_/ / /_/ / / / / /_/ /_/ /   / __/__  __/ / / /_/ /    | |/ / /  / /  
 | 
			
		||||
\____/_.___/\__,_/_/ /_/\__/\__,_/   /____/ /_/ (_)_/\____/     |___/_/  /_/   
 | 
			
		||||
                                                                               
 | 
			
		||||
EOF
 | 
			
		||||
}
 | 
			
		||||
header_info
 | 
			
		||||
echo -e "\n Loading..."
 | 
			
		||||
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
 | 
			
		||||
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
 | 
			
		||||
METHOD=""
 | 
			
		||||
NSAPP="ubuntu-2410-vm"
 | 
			
		||||
var_os="ubuntu"
 | 
			
		||||
var_version="2410"
 | 
			
		||||
 | 
			
		||||
YW=$(echo "\033[33m")
 | 
			
		||||
BL=$(echo "\033[36m")
 | 
			
		||||
RD=$(echo "\033[01;31m")
 | 
			
		||||
BGN=$(echo "\033[4;92m")
 | 
			
		||||
GN=$(echo "\033[1;92m")
 | 
			
		||||
DGN=$(echo "\033[32m")
 | 
			
		||||
CL=$(echo "\033[m")
 | 
			
		||||
 | 
			
		||||
CL=$(echo "\033[m")
 | 
			
		||||
BOLD=$(echo "\033[1m")
 | 
			
		||||
BFR="\\r\\033[K"
 | 
			
		||||
HOLD=" "
 | 
			
		||||
TAB="  "
 | 
			
		||||
 | 
			
		||||
CM="${TAB}✔️${TAB}${CL}"
 | 
			
		||||
CROSS="${TAB}✖️${TAB}${CL}"
 | 
			
		||||
INFO="${TAB}💡${TAB}${CL}"
 | 
			
		||||
OS="${TAB}🖥️${TAB}${CL}"
 | 
			
		||||
CONTAINERTYPE="${TAB}📦${TAB}${CL}"
 | 
			
		||||
DISKSIZE="${TAB}💾${TAB}${CL}"
 | 
			
		||||
CPUCORE="${TAB}🧠${TAB}${CL}"
 | 
			
		||||
RAMSIZE="${TAB}🛠️${TAB}${CL}"
 | 
			
		||||
CONTAINERID="${TAB}🆔${TAB}${CL}"
 | 
			
		||||
HOSTNAME="${TAB}🏠${TAB}${CL}"
 | 
			
		||||
BRIDGE="${TAB}🌉${TAB}${CL}"
 | 
			
		||||
GATEWAY="${TAB}🌐${TAB}${CL}"
 | 
			
		||||
DEFAULT="${TAB}⚙️${TAB}${CL}"
 | 
			
		||||
MACADDRESS="${TAB}🔗${TAB}${CL}"
 | 
			
		||||
VLANTAG="${TAB}🏷️${TAB}${CL}"
 | 
			
		||||
CREATING="${TAB}🚀${TAB}${CL}"
 | 
			
		||||
ADVANCED="${TAB}🧩${TAB}${CL}"
 | 
			
		||||
 | 
			
		||||
THIN="discard=on,ssd=1,"
 | 
			
		||||
set -e
 | 
			
		||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
 | 
			
		||||
trap cleanup EXIT
 | 
			
		||||
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
 | 
			
		||||
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
 | 
			
		||||
function error_handler() {
 | 
			
		||||
  local exit_code="$?"
 | 
			
		||||
  local line_number="$1"
 | 
			
		||||
  local command="$2"
 | 
			
		||||
  post_update_to_api "failed" "$command"
 | 
			
		||||
  local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
 | 
			
		||||
  echo -e "\n$error_message\n"
 | 
			
		||||
  cleanup_vmid
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function get_valid_nextid() {
 | 
			
		||||
  local try_id
 | 
			
		||||
  try_id=$(pvesh get /cluster/nextid)
 | 
			
		||||
  while true; do
 | 
			
		||||
    if [ -f "/etc/pve/qemu-server/${try_id}.conf" ] || [ -f "/etc/pve/lxc/${try_id}.conf" ]; then
 | 
			
		||||
      try_id=$((try_id + 1))
 | 
			
		||||
      continue
 | 
			
		||||
    fi
 | 
			
		||||
    if lvs --noheadings -o lv_name | grep -qE "(^|[-_])${try_id}($|[-_])"; then
 | 
			
		||||
      try_id=$((try_id + 1))
 | 
			
		||||
      continue
 | 
			
		||||
    fi
 | 
			
		||||
    break
 | 
			
		||||
  done
 | 
			
		||||
  echo "$try_id"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function cleanup_vmid() {
 | 
			
		||||
  if qm status $VMID &>/dev/null; then
 | 
			
		||||
    qm stop $VMID &>/dev/null
 | 
			
		||||
    qm destroy $VMID &>/dev/null
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function cleanup() {
 | 
			
		||||
  popd >/dev/null
 | 
			
		||||
  rm -rf $TEMP_DIR
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEMP_DIR=$(mktemp -d)
 | 
			
		||||
pushd $TEMP_DIR >/dev/null
 | 
			
		||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.10 VM" --yesno "This will create a New Ubuntu 24.10 VM. Proceed?" 10 58; then
 | 
			
		||||
  :
 | 
			
		||||
else
 | 
			
		||||
  header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
function msg_info() {
 | 
			
		||||
  local msg="$1"
 | 
			
		||||
  echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function msg_ok() {
 | 
			
		||||
  local msg="$1"
 | 
			
		||||
  echo -e "${BFR}${CM}${GN}${msg}${CL}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function msg_error() {
 | 
			
		||||
  local msg="$1"
 | 
			
		||||
  echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function check_root() {
 | 
			
		||||
  if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
 | 
			
		||||
    clear
 | 
			
		||||
    msg_error "Please run this script as root."
 | 
			
		||||
    echo -e "\nExiting..."
 | 
			
		||||
    sleep 2
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function arch_check() {
 | 
			
		||||
  if [ "$(dpkg --print-architecture)" != "amd64" ]; then
 | 
			
		||||
    echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n"
 | 
			
		||||
    echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
 | 
			
		||||
    echo -e "Exiting..."
 | 
			
		||||
    sleep 2
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function ssh_check() {
 | 
			
		||||
  if command -v pveversion >/dev/null 2>&1; then
 | 
			
		||||
    if [ -n "${SSH_CLIENT:+x}" ]; then
 | 
			
		||||
      if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
 | 
			
		||||
        echo "you've been warned"
 | 
			
		||||
      else
 | 
			
		||||
        clear
 | 
			
		||||
        exit
 | 
			
		||||
      fi
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function exit-script() {
 | 
			
		||||
  clear
 | 
			
		||||
  echo -e "\n${CROSS}${RD}User exited script${CL}\n"
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function default_settings() {
 | 
			
		||||
  VMID=$(get_valid_nextid)
 | 
			
		||||
  FORMAT=",efitype=4m"
 | 
			
		||||
  MACHINE=""
 | 
			
		||||
  DISK_SIZE="8G"
 | 
			
		||||
  DISK_CACHE=""
 | 
			
		||||
  HN="ubuntu"
 | 
			
		||||
  CPU_TYPE=""
 | 
			
		||||
  CORE_COUNT="2"
 | 
			
		||||
  RAM_SIZE="2048"
 | 
			
		||||
  BRG="vmbr0"
 | 
			
		||||
  MAC="$GEN_MAC"
 | 
			
		||||
  VLAN=""
 | 
			
		||||
  MTU=""
 | 
			
		||||
  START_VM="yes"
 | 
			
		||||
  METHOD="default"
 | 
			
		||||
  echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}"
 | 
			
		||||
  echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
 | 
			
		||||
  echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}"
 | 
			
		||||
  echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
 | 
			
		||||
  echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}${HN}${CL}"
 | 
			
		||||
  echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
 | 
			
		||||
  echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
 | 
			
		||||
  echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}${CL}"
 | 
			
		||||
  echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}${BRG}${CL}"
 | 
			
		||||
  echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}${MAC}${CL}"
 | 
			
		||||
  echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}Default${CL}"
 | 
			
		||||
  echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
 | 
			
		||||
  echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
 | 
			
		||||
  echo -e "${CREATING}${BOLD}${DGN}Creating a Ubuntu 24.10 VM using the above default settings${CL}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function advanced_settings() {
 | 
			
		||||
  METHOD="advanced"
 | 
			
		||||
  [ -z "${VMID:-}" ] && VMID=$(get_valid_nextid)
 | 
			
		||||
  while true; do
 | 
			
		||||
    if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $VMID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
      if [ -z "$VMID" ]; then
 | 
			
		||||
        VMID=$(get_valid_nextid)
 | 
			
		||||
      fi
 | 
			
		||||
      if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then
 | 
			
		||||
        echo -e "${CROSS}${RD} ID $VMID is already in use${CL}"
 | 
			
		||||
        sleep 2
 | 
			
		||||
        continue
 | 
			
		||||
      fi
 | 
			
		||||
      echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
 | 
			
		||||
      break
 | 
			
		||||
    else
 | 
			
		||||
      exit-script
 | 
			
		||||
    fi
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
  if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
 | 
			
		||||
    "i440fx" "Machine i440fx" ON \
 | 
			
		||||
    "q35" "Machine q35" OFF \
 | 
			
		||||
    3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ $MACH = q35 ]; then
 | 
			
		||||
      echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
 | 
			
		||||
      FORMAT=""
 | 
			
		||||
      MACHINE=" -machine q35"
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
 | 
			
		||||
      FORMAT=",efitype=4m"
 | 
			
		||||
      MACHINE=""
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GiB (e.g., 10, 20)" 8 58 "$DISK_SIZE" --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
 | 
			
		||||
    if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
 | 
			
		||||
      DISK_SIZE="${DISK_SIZE}G"
 | 
			
		||||
      echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
			
		||||
    elif [[ "$DISK_SIZE" =~ ^[0-9]+G$ ]]; then
 | 
			
		||||
      echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${DISKSIZE}${BOLD}${RD}Invalid Disk Size. Please use a number (e.g., 10 or 10G).${CL}"
 | 
			
		||||
      exit-script
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
 | 
			
		||||
    "0" "None (Default)" ON \
 | 
			
		||||
    "1" "Write Through" OFF \
 | 
			
		||||
    3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ $DISK_CACHE = "1" ]; then
 | 
			
		||||
      echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}Write Through${CL}"
 | 
			
		||||
      DISK_CACHE="cache=writethrough,"
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
 | 
			
		||||
      DISK_CACHE=""
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 ubuntu --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ -z $VM_NAME ]; then
 | 
			
		||||
      HN="ubuntu"
 | 
			
		||||
      echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      HN=$(echo ${VM_NAME,,} | tr -d ' ')
 | 
			
		||||
      echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
 | 
			
		||||
    "0" "KVM64 (Default)" ON \
 | 
			
		||||
    "1" "Host" OFF \
 | 
			
		||||
    3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ $CPU_TYPE1 = "1" ]; then
 | 
			
		||||
      echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}Host${CL}"
 | 
			
		||||
      CPU_TYPE=" -cpu host"
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
 | 
			
		||||
      CPU_TYPE=""
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ -z $CORE_COUNT ]; then
 | 
			
		||||
      CORE_COUNT="2"
 | 
			
		||||
      echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ -z $RAM_SIZE ]; then
 | 
			
		||||
      RAM_SIZE="2048"
 | 
			
		||||
      echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ -z $BRG ]; then
 | 
			
		||||
      BRG="vmbr0"
 | 
			
		||||
      echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ -z $MAC1 ]; then
 | 
			
		||||
      MAC="$GEN_MAC"
 | 
			
		||||
      echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      MAC="$MAC1"
 | 
			
		||||
      echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ -z $VLAN1 ]; then
 | 
			
		||||
      VLAN1="Default"
 | 
			
		||||
      VLAN=""
 | 
			
		||||
      echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      VLAN=",tag=$VLAN1"
 | 
			
		||||
      echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
 | 
			
		||||
    if [ -z $MTU1 ]; then
 | 
			
		||||
      MTU1="Default"
 | 
			
		||||
      MTU=""
 | 
			
		||||
      echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
 | 
			
		||||
    else
 | 
			
		||||
      MTU=",mtu=$MTU1"
 | 
			
		||||
      echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    exit-script
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
 | 
			
		||||
    echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
 | 
			
		||||
    START_VM="yes"
 | 
			
		||||
  else
 | 
			
		||||
    echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}no${CL}"
 | 
			
		||||
    START_VM="no"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Ubuntu 24.10 VM?" --no-button Do-Over 10 58); then
 | 
			
		||||
    echo -e "${CREATING}${BOLD}${DGN}Creating a Ubuntu 24.10 VM using the above advanced settings${CL}"
 | 
			
		||||
  else
 | 
			
		||||
    header_info
 | 
			
		||||
    echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
 | 
			
		||||
    advanced_settings
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function start_script() {
 | 
			
		||||
  if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
 | 
			
		||||
    header_info
 | 
			
		||||
    echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}"
 | 
			
		||||
    default_settings
 | 
			
		||||
  else
 | 
			
		||||
    header_info
 | 
			
		||||
    echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
 | 
			
		||||
    advanced_settings
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
check_root
 | 
			
		||||
arch_check
 | 
			
		||||
pve_check
 | 
			
		||||
ssh_check
 | 
			
		||||
start_script
 | 
			
		||||
post_to_api_vm
 | 
			
		||||
 | 
			
		||||
msg_info "Validating Storage"
 | 
			
		||||
while read -r line; do
 | 
			
		||||
  TAG=$(echo $line | awk '{print $1}')
 | 
			
		||||
  TYPE=$(echo $line | awk '{printf "%-10s", $2}')
 | 
			
		||||
  FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
 | 
			
		||||
  ITEM="  Type: $TYPE Free: $FREE "
 | 
			
		||||
  OFFSET=2
 | 
			
		||||
  if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
 | 
			
		||||
    MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
 | 
			
		||||
  fi
 | 
			
		||||
  STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
 | 
			
		||||
done < <(pvesm status -content images | awk 'NR>1')
 | 
			
		||||
VALID=$(pvesm status -content images | awk 'NR>1')
 | 
			
		||||
if [ -z "$VALID" ]; then
 | 
			
		||||
  msg_error "Unable to detect a valid storage location."
 | 
			
		||||
  exit
 | 
			
		||||
elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
 | 
			
		||||
  STORAGE=${STORAGE_MENU[0]}
 | 
			
		||||
else
 | 
			
		||||
  while [ -z "${STORAGE:+x}" ]; do
 | 
			
		||||
    STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
 | 
			
		||||
      "Which storage pool would you like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
 | 
			
		||||
      16 $(($MSG_MAX_LENGTH + 23)) 6 \
 | 
			
		||||
      "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
 | 
			
		||||
  done
 | 
			
		||||
fi
 | 
			
		||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
 | 
			
		||||
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
 | 
			
		||||
msg_info "Retrieving the URL for the Ubuntu 24.10 Disk Image"
 | 
			
		||||
URL=https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-amd64.img
 | 
			
		||||
sleep 2
 | 
			
		||||
msg_ok "${CL}${BL}${URL}${CL}"
 | 
			
		||||
curl -f#SL -o "$(basename "$URL")" "$URL"
 | 
			
		||||
echo -en "\e[1A\e[0K"
 | 
			
		||||
FILE=$(basename $URL)
 | 
			
		||||
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
 | 
			
		||||
 | 
			
		||||
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
 | 
			
		||||
case $STORAGE_TYPE in
 | 
			
		||||
nfs | dir | cifs)
 | 
			
		||||
  DISK_EXT=".qcow2"
 | 
			
		||||
  DISK_REF="$VMID/"
 | 
			
		||||
  DISK_IMPORT="-format qcow2"
 | 
			
		||||
  THIN=""
 | 
			
		||||
  ;;
 | 
			
		||||
btrfs)
 | 
			
		||||
  DISK_EXT=".raw"
 | 
			
		||||
  DISK_REF="$VMID/"
 | 
			
		||||
  DISK_IMPORT="-format raw"
 | 
			
		||||
  FORMAT=",efitype=4m"
 | 
			
		||||
  THIN=""
 | 
			
		||||
  ;;
 | 
			
		||||
esac
 | 
			
		||||
for i in {0,1}; do
 | 
			
		||||
  disk="DISK$i"
 | 
			
		||||
  eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
 | 
			
		||||
  eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
msg_info "Creating a Ubuntu 24.10 VM"
 | 
			
		||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
 | 
			
		||||
  -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
 | 
			
		||||
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
 | 
			
		||||
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
 | 
			
		||||
qm set $VMID \
 | 
			
		||||
  -efidisk0 ${DISK0_REF}${FORMAT} \
 | 
			
		||||
  -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=${DISK_SIZE} \
 | 
			
		||||
  -ide2 ${STORAGE}:cloudinit \
 | 
			
		||||
  -boot order=scsi0 \
 | 
			
		||||
  -serial0 socket >/dev/null
 | 
			
		||||
DESCRIPTION=$(
 | 
			
		||||
  cat <<EOF
 | 
			
		||||
<div align='center'>
 | 
			
		||||
  <a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
 | 
			
		||||
    <img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
 | 
			
		||||
  </a>
 | 
			
		||||
 | 
			
		||||
  <h2 style='font-size: 24px; margin: 20px 0;'>Ubuntu 24.10 VM</h2>
 | 
			
		||||
 | 
			
		||||
  <p style='margin: 16px 0;'>
 | 
			
		||||
    <a href='https://ko-fi.com/community_scripts' target='_blank' rel='noopener noreferrer'>
 | 
			
		||||
      <img src='https://img.shields.io/badge/☕-Buy us a coffee-blue' alt='spend Coffee' />
 | 
			
		||||
    </a>
 | 
			
		||||
  </p>
 | 
			
		||||
  
 | 
			
		||||
  <span style='margin: 0 10px;'>
 | 
			
		||||
    <i class="fa fa-github fa-fw" style="color: #f5f5f5;"></i>
 | 
			
		||||
    <a href='https://github.com/community-scripts/ProxmoxVE' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>GitHub</a>
 | 
			
		||||
  </span>
 | 
			
		||||
  <span style='margin: 0 10px;'>
 | 
			
		||||
    <i class="fa fa-comments fa-fw" style="color: #f5f5f5;"></i>
 | 
			
		||||
    <a href='https://github.com/community-scripts/ProxmoxVE/discussions' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Discussions</a>
 | 
			
		||||
  </span>
 | 
			
		||||
  <span style='margin: 0 10px;'>
 | 
			
		||||
    <i class="fa fa-exclamation-circle fa-fw" style="color: #f5f5f5;"></i>
 | 
			
		||||
    <a href='https://github.com/community-scripts/ProxmoxVE/issues' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Issues</a>
 | 
			
		||||
  </span>
 | 
			
		||||
</div>
 | 
			
		||||
EOF
 | 
			
		||||
)
 | 
			
		||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
 | 
			
		||||
if [ -n "$DISK_SIZE" ]; then
 | 
			
		||||
  msg_info "Resizing disk to $DISK_SIZE GB"
 | 
			
		||||
  qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
 | 
			
		||||
else
 | 
			
		||||
  msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
 | 
			
		||||
  qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
msg_ok "Created a Ubuntu 24.10 VM ${CL}${BL}(${HN})"
 | 
			
		||||
if [ "$START_VM" == "yes" ]; then
 | 
			
		||||
  msg_info "Starting Ubuntu 24.10 VM"
 | 
			
		||||
  qm start $VMID
 | 
			
		||||
  msg_ok "Started Ubuntu 24.10 VM"
 | 
			
		||||
fi
 | 
			
		||||
post_update_to_api "done" "none"
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "Setup Cloud-Init before starting \n
 | 
			
		||||
More info at https://github.com/community-scripts/ProxmoxVE/discussions/272 \n"
 | 
			
		||||
@@ -136,36 +136,37 @@ function check_root() {
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
 | 
			
		||||
# Supported: Proxmox VE 8.0.x – 8.9.x and 9.0 (NOT 9.1+)
 | 
			
		||||
pve_check() {
 | 
			
		||||
  local PVE_VER
 | 
			
		||||
  PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 8.x
 | 
			
		||||
  # Check for Proxmox VE 8.x: allow 8.0–8.9
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR < 1 || MINOR > 4)); then
 | 
			
		||||
    if ((MINOR < 0 || MINOR > 9)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
      echo -e "Required: Proxmox VE version 8.1 – 8.4"
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 8.0 – 8.9"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Check for Proxmox VE 9.x (Beta) — require confirmation
 | 
			
		||||
  # Check for Proxmox VE 9.x: allow ONLY 9.0
 | 
			
		||||
  if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
 | 
			
		||||
    if whiptail --title "Proxmox 9.x Detected (Beta)" \
 | 
			
		||||
      --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then
 | 
			
		||||
      msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER"
 | 
			
		||||
      return 0
 | 
			
		||||
    else
 | 
			
		||||
      msg_error "Aborted by user: Proxmox VE 9.x was not confirmed."
 | 
			
		||||
    local MINOR="${BASH_REMATCH[1]}"
 | 
			
		||||
    if ((MINOR != 0)); then
 | 
			
		||||
      msg_error "This version of Proxmox VE is not yet supported."
 | 
			
		||||
      msg_error "Supported: Proxmox VE version 9.0"
 | 
			
		||||
      exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    return 0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # All other unsupported versions
 | 
			
		||||
  msg_error "This version of Proxmox VE is not supported."
 | 
			
		||||
  echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)"
 | 
			
		||||
  msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
 | 
			
		||||
  exit 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user