1
0
forked from Proxmox/ProxmoxVE

Compare commits

...

20 Commits

Author SHA1 Message Date
edfbc82048 Update CHANGELOG.md (#3792) 2025-04-09 19:42:20 +02:00
2c36a13af1 Update CHANGELOG.md (#3789)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-09 19:36:06 +02:00
607ab48f79 paperless_fix_granian_env (#3790) 2025-04-09 19:31:27 +02:00
30fbcb5ba8 quickfix broken vms 2025-04-09 19:29:12 +02:00
ef81b82d87 Update debian-vm.sh 2025-04-09 19:17:26 +02:00
f1a29c1ebb revert & fix missing git push for vms 2025-04-09 18:59:56 +02:00
404ae5dbcf fix pvecheck 2025-04-09 18:50:27 +02:00
84478921e7 quickfix vm's for pve 8.4 2025-04-09 18:35:17 +02:00
2b8d10a4d9 quickfix_quotes 2025-04-09 18:27:42 +02:00
fefdcbbad1 Update CHANGELOG.md (#3786)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-09 17:17:45 +02:00
6c239ceb56 Update linkwarden.json (#3783) 2025-04-09 17:10:51 +02:00
b520c0ab5f Paperless-NGX: remove gunicorn, use python3 for webserver (#3785) 2025-04-09 17:08:34 +02:00
d329666a88 Update CHANGELOG.md (#3780)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-09 17:00:25 +02:00
874b61d4d5 harmonize pve versions check & vm vars (#3779)
* harmonize proxmox ve version check

* Update openwrt.sh

* push 0-4 and 1-4
2025-04-09 16:13:01 +02:00
a536c4a5a0 Update CHANGELOG.md (#3776)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-09 15:40:30 +02:00
e4ef18ccfc HomeAssistantOS: allow Proxmox version 8.4 (#3773)
* Allow Proxmox version 8.4

* Update haos-vm.sh

* fix typo

---------

Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-04-09 15:31:45 +02:00
d949e836b5 core: Removal of OS/Version Selection from Advanced Settings (#3771)
* core: remove os selection in advanced_settings

* debian/ubuntu vars
2025-04-09 15:30:54 +02:00
ed29ba3409 core: a few path corrections (#3769) 2025-04-09 14:13:18 +02:00
495da1bf98 Update versions.json (#3760) 2025-04-09 14:05:50 +02:00
cc17c2618d Update CHANGELOG.md (#3767) 2025-04-09 14:05:29 +02:00
27 changed files with 361 additions and 449 deletions

View File

@ -14,6 +14,28 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
## 2025-04-09
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Paperless-NGX: Extend Granian Service Env [@MickLesk](https://github.com/MickLesk) ([#3790](https://github.com/community-scripts/ProxmoxVE/pull/3790))
- Paperless-NGX: remove gunicorn, use python3 for webserver [@MickLesk](https://github.com/MickLesk) ([#3785](https://github.com/community-scripts/ProxmoxVE/pull/3785))
- HomeAssistantOS: allow Proxmox version 8.4 [@quentinvnk](https://github.com/quentinvnk) ([#3773](https://github.com/community-scripts/ProxmoxVE/pull/3773))
- Tandoor: Add xmlsec as dependency [@tremor021](https://github.com/tremor021) ([#3762](https://github.com/community-scripts/ProxmoxVE/pull/3762))
- #### 🔧 Refactor
- harmonize pve versions check & vm vars [@MickLesk](https://github.com/MickLesk) ([#3779](https://github.com/community-scripts/ProxmoxVE/pull/3779))
### 🧰 Maintenance
- #### 💥 Breaking Changes
- core: Removal of OS/Version Selection from Advanced Settings [@MickLesk](https://github.com/MickLesk) ([#3771](https://github.com/community-scripts/ProxmoxVE/pull/3771))
- core: move misc scripts to structured addon/pve paths | Refactor JSON Editor & Script Mapping [@MickLesk](https://github.com/MickLesk) ([#3765](https://github.com/community-scripts/ProxmoxVE/pull/3765))
## 2025-04-08 ## 2025-04-08
### 🆕 New Scripts ### 🆕 New Scripts

View File

@ -6,13 +6,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Source: https://www.debian.org/ # Source: https://www.debian.org/
APP="Debian" APP="Debian"
var_tags="os" var_tags="${var_tags:-os}"
var_cpu="1" var_cpu="${var_cpu:-1}"
var_ram="512" var_ram="${var_ram:-512}"
var_disk="2" var_disk="${var_disk:-2}"
var_os="debian" var_os="${var_os:-debian}"
var_version="12" var_version="${var_version:-12}"
var_unprivileged="1" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"
variables variables
@ -20,18 +20,18 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /var ]]; then if [[ ! -d /var ]]; then
msg_error "No ${APP} Installation Found!" 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"
exit exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
} }
start start
@ -39,4 +39,4 @@ build_container
description description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

View File

@ -5,14 +5,14 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://ubuntu.com/ # Source: https://ubuntu.com/
echo -e "Loading..."
APP="Ubuntu" APP="Ubuntu"
var_tags="os" var_tags="${var_tags:-os}"
var_cpu="1" var_cpu="${var_cpu:-1}"
var_ram="512" var_ram="${var_ram:-512}"
var_disk="2" var_disk="${var_disk:-2}"
var_os="ubuntu" var_os="${var_os:-ubuntu}"
var_version="24.04" var_version="${var_version:-24.04}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"
variables variables
@ -20,18 +20,18 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /var ]]; then if [[ ! -d /var ]]; then
msg_error "No ${APP} Installation Found!" 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"
exit exit
fi
msg_info "Updating ${APP} LXC"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated ${APP} LXC"
exit
} }
start start
@ -39,4 +39,4 @@ build_container
description description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

View File

@ -6,7 +6,7 @@
], ],
"date_created": "2024-05-02", "date_created": "2024-05-02",
"type": "ct", "type": "ct",
"updateable": false, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 3000, "interface_port": 3000,
"documentation": "https://docs.linkwarden.app/", "documentation": "https://docs.linkwarden.app/",

View File

@ -1,24 +1,84 @@
[ [
{
"name": "OliveTin/OliveTin",
"version": "2025.4.8",
"date": "2025-04-08T22:02:50Z"
},
{
"name": "coder/code-server",
"version": "v4.99.1",
"date": "2025-04-08T21:35:21Z"
},
{ {
"name": "semaphoreui/semaphore", "name": "semaphoreui/semaphore",
"version": "v2.13.11-beta1", "version": "v2.13.12",
"date": "2025-04-08T10:56:42Z" "date": "2025-04-08T20:54:58Z"
},
{
"name": "fhem/fhem-mirror",
"version": "6.2",
"date": "2025-04-08T20:30:27Z"
},
{
"name": "runtipi/runtipi",
"version": "nightly",
"date": "2025-04-06T15:58:08Z"
},
{
"name": "minio/minio",
"version": "RELEASE.2025-04-08T15-41-24Z",
"date": "2025-04-08T19:51:06Z"
},
{
"name": "goauthentik/authentik",
"version": "version/2025.2.4",
"date": "2025-04-08T18:39:57Z"
},
{
"name": "influxdata/influxdb",
"version": "v1.12.0rc1",
"date": "2025-04-08T17:35:21Z"
},
{
"name": "paperless-ngx/paperless-ngx",
"version": "v2.15.0",
"date": "2025-04-08T17:24:06Z"
},
{
"name": "syncthing/syncthing",
"version": "v1.29.4",
"date": "2025-04-01T08:45:07Z"
},
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.505",
"date": "2025-04-08T15:46:42Z"
},
{
"name": "AdguardTeam/AdGuardHome",
"version": "v0.107.59",
"date": "2025-03-21T11:11:39Z"
},
{
"name": "openobserve/openobserve",
"version": "v0.14.6-rc2",
"date": "2025-04-08T14:42:54Z"
},
{
"name": "element-hq/synapse",
"version": "v1.128.0",
"date": "2025-04-08T14:27:55Z"
},
{
"name": "linkwarden/linkwarden",
"version": "v2.10.0",
"date": "2025-04-08T12:33:57Z"
}, },
{ {
"name": "n8n-io/n8n", "name": "n8n-io/n8n",
"version": "n8n@1.84.3", "version": "n8n@1.84.3",
"date": "2025-03-27T11:54:33Z" "date": "2025-03-27T11:54:33Z"
}, },
{
"name": "fhem/fhem-mirror",
"version": "6.2",
"date": "2025-04-08T10:34:47Z"
},
{
"name": "openobserve/openobserve",
"version": "v0.14.6-rc1",
"date": "2025-04-08T08:50:03Z"
},
{ {
"name": "prometheus/prometheus", "name": "prometheus/prometheus",
"version": "v0.303.0-rc.1", "version": "v0.303.0-rc.1",
@ -39,11 +99,6 @@
"version": "v0.2.6", "version": "v0.2.6",
"date": "2025-04-08T02:23:38Z" "date": "2025-04-08T02:23:38Z"
}, },
{
"name": "coder/code-server",
"version": "v4.99.0",
"date": "2025-04-08T00:55:36Z"
},
{ {
"name": "pelican-dev/panel", "name": "pelican-dev/panel",
"version": "v1.0.0-beta19", "version": "v1.0.0-beta19",
@ -109,11 +164,6 @@
"version": "pmm-6401-v1.115.0", "version": "pmm-6401-v1.115.0",
"date": "2025-04-07T11:15:53Z" "date": "2025-04-07T11:15:53Z"
}, },
{
"name": "syncthing/syncthing",
"version": "v1.29.4",
"date": "2025-04-01T08:45:07Z"
},
{ {
"name": "fallenbagel/jellyseerr", "name": "fallenbagel/jellyseerr",
"version": "preview-back-to-axios", "version": "preview-back-to-axios",
@ -184,11 +234,6 @@
"version": "1.5.34", "version": "1.5.34",
"date": "2025-03-27T16:17:38Z" "date": "2025-03-27T16:17:38Z"
}, },
{
"name": "runtipi/runtipi",
"version": "v3.10.0",
"date": "2025-03-15T14:38:16Z"
},
{ {
"name": "stackblitz-labs/bolt.diy", "name": "stackblitz-labs/bolt.diy",
"version": "v0.0.7-hf1", "version": "v0.0.7-hf1",
@ -324,11 +369,6 @@
"version": "0.49.12", "version": "0.49.12",
"date": "2025-04-04T07:31:08Z" "date": "2025-04-04T07:31:08Z"
}, },
{
"name": "minio/minio",
"version": "RELEASE.2025-04-03T14-56-28Z",
"date": "2025-04-03T19:08:18Z"
},
{ {
"name": "OctoPrint/OctoPrint", "name": "OctoPrint/OctoPrint",
"version": "1.10.3", "version": "1.10.3",
@ -364,11 +404,6 @@
"version": "2025.4.0", "version": "2025.4.0",
"date": "2025-04-02T15:38:53Z" "date": "2025-04-02T15:38:53Z"
}, },
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.503",
"date": "2025-04-02T15:12:13Z"
},
{ {
"name": "hargata/lubelog", "name": "hargata/lubelog",
"version": "v1.4.6", "version": "v1.4.6",
@ -384,16 +419,6 @@
"version": "v2.31.0", "version": "v2.31.0",
"date": "2025-04-01T18:12:45Z" "date": "2025-04-01T18:12:45Z"
}, },
{
"name": "influxdata/influxdb",
"version": "v3.0.0-0.beta.3",
"date": "2025-04-01T15:34:30Z"
},
{
"name": "element-hq/synapse",
"version": "v1.127.1",
"date": "2025-03-26T21:44:28Z"
},
{ {
"name": "theonedev/onedev", "name": "theonedev/onedev",
"version": "v11.8.6", "version": "v11.8.6",
@ -509,11 +534,6 @@
"version": "v1.6.1", "version": "v1.6.1",
"date": "2025-03-15T17:29:17Z" "date": "2025-03-15T17:29:17Z"
}, },
{
"name": "OliveTin/OliveTin",
"version": "2025.3.28",
"date": "2025-03-29T00:18:56Z"
},
{ {
"name": "TasmoAdmin/TasmoAdmin", "name": "TasmoAdmin/TasmoAdmin",
"version": "v4.2.3", "version": "v4.2.3",
@ -539,11 +559,6 @@
"version": "e5.9.0-beta.2", "version": "e5.9.0-beta.2",
"date": "2025-03-28T15:06:27Z" "date": "2025-03-28T15:06:27Z"
}, },
{
"name": "goauthentik/authentik",
"version": "version/2025.2.3",
"date": "2025-03-28T14:28:34Z"
},
{ {
"name": "hakimel/reveal.js", "name": "hakimel/reveal.js",
"version": "5.2.1", "version": "5.2.1",
@ -684,11 +699,6 @@
"version": "250321-57590c48b", "version": "250321-57590c48b",
"date": "2025-03-21T11:48:16Z" "date": "2025-03-21T11:48:16Z"
}, },
{
"name": "AdguardTeam/AdGuardHome",
"version": "v0.107.59",
"date": "2025-03-21T11:11:39Z"
},
{ {
"name": "jhuckaby/Cronicle", "name": "jhuckaby/Cronicle",
"version": "v0.9.77", "version": "v0.9.77",
@ -744,11 +754,6 @@
"version": "v0.10.2", "version": "v0.10.2",
"date": "2025-03-15T07:14:54Z" "date": "2025-03-15T07:14:54Z"
}, },
{
"name": "paperless-ngx/paperless-ngx",
"version": "v2.15.0-beta",
"date": "2025-03-14T18:05:28Z"
},
{ {
"name": "FlowiseAI/Flowise", "name": "FlowiseAI/Flowise",
"version": "flowise@2.2.7-patch.1", "version": "flowise@2.2.7-patch.1",
@ -1049,11 +1054,6 @@
"version": "0.17.1", "version": "0.17.1",
"date": "2025-01-15T19:13:33Z" "date": "2025-01-15T19:13:33Z"
}, },
{
"name": "linkwarden/linkwarden",
"version": "v2.9.3",
"date": "2025-01-13T16:19:53Z"
},
{ {
"name": "Tautulli/Tautulli", "name": "Tautulli/Tautulli",
"version": "v2.15.1", "version": "v2.15.1",

View File

@ -209,7 +209,10 @@ Requires=redis.service
[Service] [Service]
WorkingDirectory=/opt/paperless/src WorkingDirectory=/opt/paperless/src
ExecStart=/usr/local/bin/gunicorn -c /opt/paperless/gunicorn.conf.py paperless.asgi:application ExecStart=granian --interface asginl --ws "paperless.asgi:application"
Environment=GRANIAN_HOST=::
Environment=GRANIAN_PORT=8000
Environment=GRANIAN_WORKERS=1
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
variables() { variables() {
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. NSAPP=$(echo "${APP,,}" | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern.
PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase
@ -69,7 +69,7 @@ catch_errors() {
# This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message.
error_handler() { error_handler() {
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
printf "\e[?25h" printf "\e[?25h"
local exit_code="$?" local exit_code="$?"
local line_number="$1" local line_number="$1"
@ -191,7 +191,7 @@ root_check() {
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
pve_check() { pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
@ -289,25 +289,25 @@ update_motd_ip() {
# Function to download & save header files # Function to download & save header files
get_header() { get_header() {
local app_name=$(echo "${APP,,}" | tr -d ' ') local app_name=$(echo "${APP,,}" | tr -d ' ')
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/headers/${app_name}" local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/headers/${app_name}"
local local_header_path="/usr/local/community-scripts/headers/${app_name}" local local_header_path="/usr/local/community-scripts/headers/${app_name}"
mkdir -p "$(dirname "$local_header_path")" mkdir -p "$(dirname "$local_header_path")"
if [ ! -s "$local_header_path" ]; then if [ ! -s "$local_header_path" ]; then
if ! curl -fsSL "$header_url" -o "$local_header_path"; then if ! curl -fsSL "$header_url" -o "$local_header_path"; then
echo -e "Failed to download header for ${app_name}. No header will be displayed." echo -e "Failed to download header for ${app_name}. No header will be displayed."
return 1 return 1
fi
fi fi
fi
cat "$local_header_path" cat "$local_header_path"
} }
# This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node. # This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node.
header_info() { header_info() {
local app_name=$(echo ${APP,,} | tr -d ' ') local app_name=$(echo "${APP,,}" | tr -d ' ')
local header_content local header_content
# Download & save Header-File locally # Download & save Header-File locally
@ -411,128 +411,6 @@ exit_script() {
# This function allows the user to configure advanced settings for the script. # This function allows the user to configure advanced settings for the script.
advanced_settings() { advanced_settings() {
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58
if [ "$var_os" != "alpine" ]; then
var_default_os="${var_os}"
var_os=""
while [ -z "$var_os" ]; do
if [ "$var_default_os" == "debian" ]; then
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
"debian" "" ON \
"ubuntu" "" OFF \
3>&1 1>&2 2>&3); then
if [ -n "$var_os" ]; then
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
fi
else
exit_script
fi
fi
if [ "$var_default_os" == "ubuntu" ]; then
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
"debian" "" OFF \
"ubuntu" "" ON \
3>&1 1>&2 2>&3); then
if [ -n "$var_os" ]; then
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
fi
else
exit_script
fi
fi
done
fi
if [ "$var_os" == "debian" ]; then
var_default_version="${var_version}"
var_version=""
while [ -z "$var_version" ]; do
if [ "$var_default_version" == "11" ]; then
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
"11" "Bullseye" ON \
"12" "Bookworm" OFF \
3>&1 1>&2 2>&3); then
if [ -n "$var_version" ]; then
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
fi
else
exit_script
fi
fi
if [ "$var_default_version" == "12" ]; then
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
"11" "Bullseye" OFF \
"12" "Bookworm" ON \
3>&1 1>&2 2>&3); then
if [ -n "$var_version" ]; then
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
fi
else
exit_script
fi
fi
done
fi
if [ "$var_os" == "ubuntu" ]; then
var_default_version="${var_version}"
var_version=""
while [ -z "$var_version" ]; do
if [ "$var_default_version" == "20.04" ]; then
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
"20.04" "Focal" ON \
"22.04" "Jammy" OFF \
"24.04" "Noble" OFF \
"24.10" "Oracular" OFF \
3>&1 1>&2 2>&3); then
if [ -n "$var_version" ]; then
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
fi
else
exit_script
fi
elif [ "$var_default_version" == "22.04" ]; then
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
"20.04" "Focal" OFF \
"22.04" "Jammy" ON \
"24.04" "Noble" OFF \
"24.10" "Oracular" OFF \
3>&1 1>&2 2>&3); then
if [ -n "$var_version" ]; then
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
fi
else
exit_script
fi
elif [ "$var_default_version" == "24.04" ]; then
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
"20.04" "Focal" OFF \
"22.04" "Jammy" OFF \
"24.04" "Noble" ON \
"24.10" "Oracular" OFF \
3>&1 1>&2 2>&3); then
if [ -n "$var_version" ]; then
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
fi
else
exit_script
fi
else
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
"20.04" "Focal" OFF \
"22.04" "Jammy" OFF \
"24.04" "Noble" OFF \
"24.10" "Oracular" ON \
3>&1 1>&2 2>&3); then
if [ -n "$var_version" ]; then
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
fi
else
exit_script
fi
fi
done
fi
# Setting Default Tag for Advanced Settings # Setting Default Tag for Advanced Settings
TAGS="community-script;${var_tags:-}" TAGS="community-script;${var_tags:-}"
CT_DEFAULT_TYPE="${CT_TYPE}" CT_DEFAULT_TYPE="${CT_TYPE}"
@ -548,6 +426,8 @@ advanced_settings() {
if [ "$CT_TYPE" -eq 0 ]; then if [ "$CT_TYPE" -eq 0 ]; then
CT_TYPE_DESC="Privileged" CT_TYPE_DESC="Privileged"
fi fi
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
fi fi
else else
@ -564,6 +444,8 @@ advanced_settings() {
if [ "$CT_TYPE" -eq 0 ]; then if [ "$CT_TYPE" -eq 0 ]; then
CT_TYPE_DESC="Privileged" CT_TYPE_DESC="Privileged"
fi fi
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
fi fi
else else
@ -603,7 +485,7 @@ advanced_settings() {
fi fi
done done
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
if [ -z "$CT_ID" ]; then if [ -z "$CT_ID" ]; then
CT_ID="$NEXTID" CT_ID="$NEXTID"
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
@ -614,18 +496,18 @@ advanced_settings() {
exit exit
fi fi
if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3); then
if [ -z "$CT_NAME" ]; then if [ -z "$CT_NAME" ]; then
HN="$NSAPP" HN="$NSAPP"
else else
HN=$(echo ${CT_NAME,,} | tr -d ' ') HN=$(echo "${CT_NAME,,}" | tr -d ' ')
fi fi
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
else else
exit_script exit_script
fi fi
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 "$var_disk" --title "DISK SIZE" 3>&1 1>&2 2>&3); then
if [ -z "$DISK_SIZE" ]; then if [ -z "$DISK_SIZE" ]; then
DISK_SIZE="$var_disk" DISK_SIZE="$var_disk"
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
@ -640,7 +522,7 @@ advanced_settings() {
exit_script exit_script
fi fi
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" --title "CORE COUNT" 3>&1 1>&2 2>&3); then
if [ -z "$CORE_COUNT" ]; then if [ -z "$CORE_COUNT" ]; then
CORE_COUNT="$var_cpu" CORE_COUNT="$var_cpu"
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
@ -651,7 +533,7 @@ advanced_settings() {
exit_script exit_script
fi fi
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" --title "RAM" 3>&1 1>&2 2>&3); then
if [ -z "$RAM_SIZE" ]; then if [ -z "$RAM_SIZE" ]; then
RAM_SIZE="$var_ram" RAM_SIZE="$var_ram"
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
@ -731,7 +613,7 @@ advanced_settings() {
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [The MTU of your selected vmbr, default is 1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [The MTU of your selected vmbr, default is 1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
if [ -z $MTU1 ]; then if [ -z "$MTU1" ]; then
MTU1="Default" MTU1="Default"
MTU="" MTU=""
else else
@ -743,7 +625,7 @@ advanced_settings() {
fi fi
if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then
if [ -z $SD ]; then if [ -z "$SD" ]; then
SX=Host SX=Host
SD="" SD=""
else else
@ -756,7 +638,7 @@ advanced_settings() {
fi fi
if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then
if [ -z $NX ]; then if [ -z "$NX" ]; then
NX=Host NX=Host
NS="" NS=""
else else
@ -768,7 +650,7 @@ advanced_settings() {
fi fi
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then
if [ -z $MAC1 ]; then if [ -z "$MAC1" ]; then
MAC1="Default" MAC1="Default"
MAC="" MAC=""
else else
@ -780,7 +662,7 @@ advanced_settings() {
fi fi
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
if [ -z $VLAN1 ]; then if [ -z "$VLAN1" ]; then
VLAN1="Default" VLAN1="Default"
VLAN="" VLAN=""
else else
@ -791,7 +673,7 @@ advanced_settings() {
exit_script exit_script
fi fi
if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3); then
if [ -n "${ADV_TAGS}" ]; then if [ -n "${ADV_TAGS}" ]; then
ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]')
TAGS="${ADV_TAGS}" TAGS="${ADV_TAGS}"
@ -1095,7 +977,7 @@ build_container() {
fi fi
TEMP_DIR=$(mktemp -d) TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null pushd "$TEMP_DIR" >/dev/null
if [ "$var_os" == "alpine" ]; then if [ "$var_os" == "alpine" ]; then
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/alpine-install.func)" export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/alpine-install.func)"
else else
@ -1135,7 +1017,7 @@ build_container() {
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
if [ "$CT_TYPE" == "0" ]; then if [ "$CT_TYPE" == "0" ]; then
cat <<EOF >>$LXC_CONFIG cat <<EOF >>"$LXC_CONFIG"
# USB passthrough # USB passthrough
lxc.cgroup2.devices.allow: a lxc.cgroup2.devices.allow: a
lxc.cap.drop: lxc.cap.drop:
@ -1151,7 +1033,7 @@ EOF
if [ "$CT_TYPE" == "0" ]; then if [ "$CT_TYPE" == "0" ]; then
if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then
cat <<EOF >>$LXC_CONFIG cat <<EOF >>"$LXC_CONFIG"
# VAAPI hardware transcoding # VAAPI hardware transcoding
lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 226:128 rwm
@ -1165,13 +1047,13 @@ EOF
if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then
if [[ -e "/dev/dri/renderD128" ]]; then if [[ -e "/dev/dri/renderD128" ]]; then
if [[ -e "/dev/dri/card0" ]]; then if [[ -e "/dev/dri/card0" ]]; then
cat <<EOF >>$LXC_CONFIG cat <<EOF >>"$LXC_CONFIG"
# VAAPI hardware transcoding # VAAPI hardware transcoding
dev0: /dev/dri/card0,gid=44 dev0: /dev/dri/card0,gid=44
dev1: /dev/dri/renderD128,gid=104 dev1: /dev/dri/renderD128,gid=104
EOF EOF
else else
cat <<EOF >>$LXC_CONFIG cat <<EOF >>"$LXC_CONFIG"
# VAAPI hardware transcoding # VAAPI hardware transcoding
dev0: /dev/dri/card1,gid=44 dev0: /dev/dri/card1,gid=44
dev1: /dev/dri/renderD128,gid=104 dev1: /dev/dri/renderD128,gid=104
@ -1193,7 +1075,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
EOF' EOF'
pct exec "$CTID" -- ash -c "apk add bash >/dev/null" pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
fi fi
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/$var_install.sh)" || exit $? lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" || exit $?
} }

View File

@ -95,7 +95,7 @@ uninstall() {
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
} }
if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
echo -e "This version of Proxmox Virtual Environment is not supported" echo -e "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires PVE Version 8.0 or higher" echo -e "Requires PVE Version 8.0 or higher"
echo -e "Exiting..." echo -e "Exiting..."

View File

@ -41,7 +41,7 @@ catch_errors() {
# This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message.
error_handler() { error_handler() {
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
printf "\e[?25h" printf "\e[?25h"
local exit_code="$?" local exit_code="$?"
local line_number="$1" local line_number="$1"
@ -84,7 +84,7 @@ msg_ok() {
# This function displays a error message with a red color. # This function displays a error message with a red color.
msg_error() { msg_error() {
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
printf "\e[?25h" printf "\e[?25h"
local msg="$1" local msg="$1"
echo -e "${BFR}${CROSS}${RD}${msg}${CL}" echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
@ -102,7 +102,7 @@ while true; do
esac esac
done done
if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" 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 or later."
msg_error "Exiting..." msg_error "Exiting..."

View File

@ -40,7 +40,7 @@ function clean_container() {
header_info header_info
name=$(pct exec "$container" hostname) name=$(pct exec "$container" hostname)
echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n" 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/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update" 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"
} }
for container in $(pct list | awk '{if(NR>1) print $1}'); do for container in $(pct list | awk '{if(NR>1) print $1}'); do
if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then
@ -56,18 +56,18 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
continue continue
fi fi
status=$(pct status $container) status=$(pct status "$container")
template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") template=$(pct config "$container" | grep -q "template:" && echo "true" || echo "false")
if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n" echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
pct start $container pct start "$container"
echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n" echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n"
sleep 5 sleep 5
clean_container $container clean_container "$container"
echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n" echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n"
pct shutdown $container & pct shutdown "$container" &
elif [ "$status" == "status: running" ]; then elif [ "$status" == "status: running" ]; then
clean_container $container clean_container "$container"
fi fi
fi fi
done done

View File

@ -4,7 +4,7 @@
# Author: tteck (tteckster) # Author: tteck (tteckster)
# License: MIT # License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/cron-update-lxcs.sh)" # bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/cron-update-lxcs.sh)"
clear clear
cat <<"EOF" cat <<"EOF"
@ -25,13 +25,13 @@ add() {
*) echo "Please answer yes or no." ;; *) echo "Please answer yes or no." ;;
esac esac
done done
sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -' sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -'
clear clear
echo -e "\n To view Cron Update LXCs logs: cat /var/log/update-lxcs-cron.log" echo -e "\n To view Cron Update LXCs logs: cat /var/log/update-lxcs-cron.log"
} }
remove() { remove() {
(crontab -l | grep -v "github.com/community-scripts/ProxmoxVE/raw/main/misc/update-lxcs-cron.sh") | crontab - (crontab -l | grep -v "update-lxcs-cron.sh") | crontab -
rm -rf /var/log/update-lxcs-cron.log rm -rf /var/log/update-lxcs-cron.log
echo "Removed Crontab Schedule from Proxmox VE" echo "Removed Crontab Schedule from Proxmox VE"
} }

View File

@ -79,15 +79,15 @@ done
# Add autodev settings # Add autodev settings
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
sed '/autodev/d' $CTID_CONFIG_PATH >CTID.conf sed '/autodev/d' "$CTID_CONFIG_PATH" >CTID.conf
cat CTID.conf >$CTID_CONFIG_PATH cat CTID.conf >"$CTID_CONFIG_PATH"
cat <<EOF >>$CTID_CONFIG_PATH cat <<EOF >>"$CTID_CONFIG_PATH"
lxc.autodev: 1 lxc.autodev: 1
lxc.hook.autodev: bash -c '$HOOK_SCRIPT' lxc.hook.autodev: bash -c '$HOOK_SCRIPT'
EOF EOF
echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m" echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m"
# In the Proxmox web shell run # In the Proxmox web shell run
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/frigate-support.sh)" # bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/frigate-support.sh)"
# Reboot the LXC to apply the changes # Reboot the LXC to apply the changes

View File

@ -5,7 +5,7 @@
# License: MIT # License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Execute within the Proxmox shell # Execute within the Proxmox shell
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/hw-acceleration.sh)" # bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/hw-acceleration.sh)"
set -e set -e
function header_info { function header_info {
@ -41,7 +41,7 @@ function msg_ok() {
echo -e "${BFR} ${CM} ${GN}${msg}${CL}" echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
} }
if ! pveversion | grep -Eq "pve-manager/(8\.[1-3])"; then if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires PVE Version 8.1 or higher" echo -e "Requires PVE Version 8.1 or higher"
echo -e "Exiting..." echo -e "Exiting..."
@ -76,7 +76,7 @@ else
fi fi
header_info header_info
cat <<EOF >>/etc/pve/lxc/${privileged_container}.conf cat <<EOF >>/etc/pve/lxc/"${privileged_container}".conf
lxc.cgroup2.devices.allow: c 226:0 rwm lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm lxc.cgroup2.devices.allow: c 29:0 rwm
@ -89,7 +89,7 @@ read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 onl
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
header_info header_info
msg_info "Installing Hardware Acceleration (non-free)" msg_info "Installing Hardware Acceleration (non-free)"
pct exec ${privileged_container} -- bash -c "cat <<EOF >/etc/apt/sources.list.d/non-free.list pct exec "${privileged_container}" -- bash -c "cat <<EOF >/etc/apt/sources.list.d/non-free.list
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
@ -101,12 +101,12 @@ deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
EOF" EOF"
pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" pct exec "${privileged_container}" -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render"
msg_ok "Installed Hardware Acceleration (non-free)" msg_ok "Installed Hardware Acceleration (non-free)"
else else
header_info header_info
msg_info "Installing Hardware Acceleration" msg_info "Installing Hardware Acceleration"
pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render" pct exec "${privileged_container}" -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render"
msg_ok "Installed Hardware Acceleration" msg_ok "Installed Hardware Acceleration"
fi fi
sleep 1 sleep 1

View File

@ -234,7 +234,7 @@ while true; do
esac esac
done done
if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.0 or later." echo -e "Requires Proxmox Virtual Environment Version 8.0 or later."
echo -e "Exiting..." echo -e "Exiting..."

View File

@ -6,6 +6,7 @@
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
function header_info { function header_info {
clear clear
cat <<"EOF" cat <<"EOF"
@ -64,7 +65,7 @@ THIN="discard=on,ssd=1,"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -93,7 +94,7 @@ pushd $TEMP_DIR >/dev/null
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Arch Linux VM" --yesno "This will create a New Arch Linux VM. Proceed?" 10 58; then if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Arch Linux VM" --yesno "This will create a New Arch Linux VM. Proceed?" 10 58; then
: :
else else
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
fi fi
function msg_info() { function msg_info() {
@ -122,7 +123,7 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
@ -227,7 +228,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi 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 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 ' ') DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
@ -242,7 +243,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi fi
if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ 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 \ "0" "None (Default)" ON \
"1" "Write Through" OFF \ "1" "Write Through" OFF \
@ -494,11 +495,11 @@ EOF
) )
qm set "$VMID" -description "$DESCRIPTION" >/dev/null qm set "$VMID" -description "$DESCRIPTION" >/dev/null
if [ -n "$DISK_SIZE" ]; then if [ -n "$DISK_SIZE" ]; then
msg_info "Resizing disk to $DISK_SIZE GB" msg_info "Resizing disk to $DISK_SIZE GB"
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
else else
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
fi fi
msg_ok "Created a Arch Linux VM ${CL}${BL}(${HN})" msg_ok "Created a Arch Linux VM ${CL}${BL}(${HN})"

View File

@ -63,7 +63,7 @@ THIN="discard=on,ssd=1,"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -93,7 +93,7 @@ pushd $TEMP_DIR >/dev/null
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then
: :
else else
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
fi fi
function msg_info() { function msg_info() {
@ -122,7 +122,7 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
@ -227,7 +227,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi 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 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 ' ') DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
@ -494,12 +494,12 @@ EOF
) )
qm set "$VMID" -description "$DESCRIPTION" >/dev/null qm set "$VMID" -description "$DESCRIPTION" >/dev/null
if [ -n "$DISK_SIZE" ]; then if [ -n "$DISK_SIZE" ]; then
msg_info "Resizing disk to $DISK_SIZE GB" msg_info "Resizing disk to $DISK_SIZE GB"
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
else else
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
fi fi
msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})" msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})"
if [ "$START_VM" == "yes" ]; then if [ "$START_VM" == "yes" ]; then

View File

@ -44,7 +44,7 @@ THIN="discard=on,ssd=1,"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -102,13 +102,13 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
sleep 2 sleep 2
exit exit
fi fi
} }
function arch_check() { function arch_check() {
@ -421,13 +421,14 @@ msg_ok "Installed libguestfs-tools successfully"
msg_info "Adding Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image" msg_info "Adding Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image"
virt-customize -q -a "${FILE}" --install qemu-guest-agent,apt-transport-https,ca-certificates,curl,gnupg,software-properties-common,lsb-release >/dev/null && virt-customize -q -a "${FILE}" --install qemu-guest-agent,apt-transport-https,ca-certificates,curl,gnupg,software-properties-common,lsb-release >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg" >/dev/null && virt-customize -q -a "${FILE}" --run-command "mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable' > /etc/apt/sources.list.d/docker.list" >/dev/null && virt-customize -q -a "${FILE}" --run-command "echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable' > /etc/apt/sources.list.d/docker.list" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "apt-get update -qq && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin" >/dev/null && virt-customize -q -a "${FILE}" --run-command "apt-get update -qq && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "systemctl enable docker" >/dev/null && virt-customize -q -a "${FILE}" --run-command "systemctl enable docker" >/dev/null &&
virt-customize -q -a "${FILE}" --run-command "echo -n > /etc/machine-id" >/dev/null virt-customize -q -a "${FILE}" --run-command "echo -n > /etc/machine-id" >/dev/null
msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image successfully" msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image successfully"
msg_info "Creating a Docker VM" msg_info "Creating a Docker VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ 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,debian12,docker -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -name $HN -tags community-script,debian12,docker -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
@ -441,8 +442,7 @@ qm set $VMID \
qm resize $VMID scsi0 8G >/dev/null qm resize $VMID scsi0 8G >/dev/null
qm set $VMID --agent enabled=1 >/dev/null qm set $VMID --agent enabled=1 >/dev/null
DESCRIPTION=$( DESCRIPTION=$(cat <<EOF
cat <<EOF
<div align='center'> <div align='center'>
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'> <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;'/> <img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>

View File

@ -7,6 +7,7 @@
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
function header_info { function header_info {
clear clear
cat <<"EOF" cat <<"EOF"
@ -50,11 +51,11 @@ SPINNER_PID=""
set -Eeuo pipefail set -Eeuo pipefail
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
printf "\e[?25h" printf "\e[?25h"
local exit_code="$?" local exit_code="$?"
local line_number="$1" local line_number="$1"
@ -86,13 +87,13 @@ else
fi fi
function spinner() { function spinner() {
local chars="/-\|" local chars="/-\|"
local spin_i=0 local spin_i=0
printf "\e[?25l" printf "\e[?25l"
while true; do while true; do
printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}" printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}"
sleep 0.1 sleep 0.1
done done
} }
function msg_info() { function msg_info() {
@ -103,14 +104,14 @@ function msg_info() {
} }
function msg_ok() { function msg_ok() {
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
printf "\e[?25h" printf "\e[?25h"
local msg="$1" local msg="$1"
echo -e "${BFR} ${CM} ${GN}${msg}${CL}" echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
} }
function msg_error() { function msg_error() {
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
printf "\e[?25h" printf "\e[?25h"
local msg="$1" local msg="$1"
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
@ -127,13 +128,13 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
sleep 2 sleep 2
exit exit
fi fi
} }
function arch_check() { function arch_check() {
@ -392,6 +393,7 @@ pve_check
ssh_check ssh_check
start_script start_script
post_to_api_vm post_to_api_vm
msg_info "Validating Storage" msg_info "Validating Storage"
@ -414,7 +416,7 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
STORAGE=${STORAGE_MENU[0]} STORAGE=${STORAGE_MENU[0]}
else else
while [ -z "${STORAGE:+x}" ]; do while [ -z "${STORAGE:+x}" ]; do
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
printf "\e[?25h" printf "\e[?25h"
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
@ -483,3 +485,5 @@ if [ "$START_VM" == "yes" ]; then
fi fi
post_update_to_api "done" "none" post_update_to_api "done" "none"
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"

View File

@ -7,6 +7,7 @@
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
function header_info { function header_info {
cat <<"EOF" cat <<"EOF"
__ ____ __ __ _ __ ____ __ ____ _____ ________ ______ __ ____ __ __ _ __ ____ __ ____ _____ ________ ______
@ -49,7 +50,7 @@ shopt -s expand_aliases
alias die='EXIT=$? LINE=$LINENO error_exit' alias die='EXIT=$? LINE=$LINENO error_exit'
trap die ERR trap die ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_exit() { function error_exit() {
trap - ERR trap - ERR
@ -74,7 +75,7 @@ function cleanup() {
} }
TEMP_DIR=$(mktemp -d) TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null pushd $TEMP_DIR >/dev/null
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."

View File

@ -46,7 +46,7 @@ THIN="discard=on,ssd=1"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -104,13 +104,13 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
sleep 2 sleep 2
exit exit
fi fi
} }
function arch_check() { function arch_check() {

View File

@ -49,7 +49,7 @@ CROSS="${RD}✗${CL}"
set -Eeo pipefail set -Eeo pipefail
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -170,13 +170,13 @@ function msg_error() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
sleep 2 sleep 2
exit exit
fi fi
} }
function arch_check() { function arch_check() {

View File

@ -8,7 +8,7 @@ source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-sc
function header_info { function header_info {
clear clear
cat <<"EOF" cat <<"EOF"
____ ____ _ __ ____ ____ _ __
/ __ \/ __ \/ | / /_______ ____ ________ / __ \/ __ \/ | / /_______ ____ ________
/ / / / /_/ / |/ / ___/ _ \/ __ \/ ___/ _ \ / / / / /_/ / |/ / ___/ _ \/ __ \/ ___/ _ \
@ -164,7 +164,7 @@ function msg_error() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
@ -230,8 +230,8 @@ function default_settings() {
echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}"
echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}"
if ! grep -q "^iface ${BRG}" /etc/network/interfaces; then if ! grep -q "^iface ${BRG}" /etc/network/interfaces; then
msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces"
exit exit
else else
echo -e "${DGN}Using LAN Bridge: ${BGN}${BRG}${CL}" echo -e "${DGN}Using LAN Bridge: ${BGN}${BRG}${CL}"
fi fi
@ -530,7 +530,7 @@ msg_ok "${CL}${BL}${URL}${CL}"
curl -f#SL -o "$(basename "$URL")" "$URL" curl -f#SL -o "$(basename "$URL")" "$URL"
echo -en "\e[1A\e[0K" echo -en "\e[1A\e[0K"
FILE=Fressbsd.qcow2 FILE=Fressbsd.qcow2
unxz -cv $(basename $URL) >${FILE} unxz -cv $(basename $URL) > ${FILE}
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
@ -564,11 +564,10 @@ qm set $VMID \
-efidisk0 ${DISK0_REF}${FORMAT} \ -efidisk0 ${DISK0_REF}${FORMAT} \
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \
-boot order=scsi0 \ -boot order=scsi0 \
-serial0 socket \ -serial0 socket >/dev/null \
-tags community-script >/dev/null -tags community-script
qm resize $VMID scsi0 10G >/dev/null qm resize $VMID scsi0 10G >/dev/null
DESCRIPTION=$( DESCRIPTION=$(cat <<EOF
cat <<EOF
<div align='center'> <div align='center'>
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'> <a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
<img src='https://raw.githubusercontent.com/michelroegl-brunner/ProxmoxVE/refs/heads/develop/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/> <img src='https://raw.githubusercontent.com/michelroegl-brunner/ProxmoxVE/refs/heads/develop/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
@ -597,76 +596,76 @@ DESCRIPTION=$(
</div> </div>
EOF EOF
) )
qm set "$VMID" -description "$DESCRIPTION" >/dev/null qm set "$VMID" -description "$DESCRIPTION" >/dev/null
msg_info "Bridge interfaces are being added." msg_info "Bridge interfaces are being added."
qm set $VMID \ qm set $VMID \
-net0 virtio,bridge=${BRG},macaddr=${MAC}${VLAN}${MTU} 2>/dev/null -net0 virtio,bridge=${BRG},macaddr=${MAC}${VLAN}${MTU} 2>/dev/null
msg_ok "Bridge interfaces have been successfully added." msg_ok "Bridge interfaces have been successfully added."
msg_ok "Created a OPNsense VM ${CL}${BL}(${HN})" msg_ok "Created a OPNsense VM ${CL}${BL}(${HN})"
msg_ok "Starting OPNsense VM (Patience this takes 20-30 minutes)" msg_ok "Starting OPNsense VM (Patience this takes 20-30 minutes)"
qm start $VMID qm start $VMID
sleep 90 sleep 90
send_line_to_vm "root" send_line_to_vm "root"
send_line_to_vm "fetch https://raw.githubusercontent.com/opnsense/update/master/src/bootstrap/opnsense-bootstrap.sh.in" send_line_to_vm "fetch https://raw.githubusercontent.com/opnsense/update/master/src/bootstrap/opnsense-bootstrap.sh.in"
qm set $VMID \ qm set $VMID \
-net1 virtio,bridge=${WAN_BRG},macaddr=${WAN_MAC} &>/dev/null -net1 virtio,bridge=${WAN_BRG},macaddr=${WAN_MAC} &>/dev/null
sleep 10 sleep 10
send_line_to_vm "sh ./opnsense-bootstrap.sh.in -y -f -r 25.1" send_line_to_vm "sh ./opnsense-bootstrap.sh.in -y -f -r 25.1"
msg_ok "OPNsense VM is being installed, do not close the terminal, or the installation will fail." msg_ok "OPNsense VM is being installed, do not close the terminal, or the installation will fail."
#We need to wait for the OPNsense build proccess to finish, this takes a few minutes #We need to wait for the OPNsense build proccess to finish, this takes a few minutes
sleep 1000 sleep 1000
send_line_to_vm "root" send_line_to_vm "root"
send_line_to_vm "opnsense" send_line_to_vm "opnsense"
send_line_to_vm "2" send_line_to_vm "2"
if [ "$IP_ADDR" != "" ]; then if [ "$IP_ADDR" != "" ]; then
send_line_to_vm "1" send_line_to_vm "1"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "${IP_ADDR}" send_line_to_vm "${IP_ADDR}"
send_line_to_vm "${NETMASK}" send_line_to_vm "${NETMASK}"
send_line_to_vm "${LAN_GW}" send_line_to_vm "${LAN_GW}"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm " " send_line_to_vm " "
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm " " send_line_to_vm " "
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
else else
send_line_to_vm "1" send_line_to_vm "1"
send_line_to_vm "y" send_line_to_vm "y"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm " " send_line_to_vm " "
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
fi fi
#we need to wait for the Config changes to be saved #we need to wait for the Config changes to be saved
sleep 20 sleep 20
if [ "$WAN_IP_ADDR" != "" ]; then if [ "$WAN_IP_ADDR" != "" ]; then
send_line_to_vm "2" send_line_to_vm "2"
send_line_to_vm "2" send_line_to_vm "2"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "${WAN_IP_ADDR}" send_line_to_vm "${WAN_IP_ADDR}"
send_line_to_vm "${NETMASK}" send_line_to_vm "${NETMASK}"
send_line_to_vm "${LAN_GW}" send_line_to_vm "${LAN_GW}"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm " " send_line_to_vm " "
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm " " send_line_to_vm " "
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
send_line_to_vm "n" send_line_to_vm "n"
fi fi
sleep 10 sleep 10
send_line_to_vm "0" send_line_to_vm "0"
msg_ok "Started OPNsense VM" msg_ok "Started OPNsense VM"
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
if [ "$IP_ADDR" != "" ]; then if [ "$IP_ADDR" != "" ]; then

View File

@ -46,7 +46,7 @@ THIN="discard=on,ssd=1"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -104,13 +104,13 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
sleep 2 sleep 2
exit exit
fi fi
} }
function arch_check() { function arch_check() {

View File

@ -58,7 +58,7 @@ shopt -s expand_aliases
alias die='EXIT=$? LINE=$LINENO error_exit' alias die='EXIT=$? LINE=$LINENO error_exit'
trap die ERR trap die ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_exit() { function error_exit() {
trap - ERR trap - ERR
@ -84,10 +84,10 @@ function cleanup() {
} }
TEMP_DIR=$(mktemp -d) TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null pushd $TEMP_DIR >/dev/null
if ! command -v whiptail &>/dev/null; then if ! command -v whiptail &> /dev/null; then
echo "Installing whiptail..." echo "Installing whiptail..."
apt-get update &>/dev/null apt-get update &>/dev/null
apt-get install -y whiptail &>/dev/null apt-get install -y whiptail &>/dev/null
fi fi
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then
echo "User selected Yes" echo "User selected Yes"

View File

@ -63,7 +63,7 @@ THIN="discard=on,ssd=1,"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -92,7 +92,7 @@ pushd $TEMP_DIR >/dev/null
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 22.04 VM" --yesno "This will create a New Ubuntu 22.04 VM. Proceed?" 10 58; then if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 22.04 VM" --yesno "This will create a New Ubuntu 22.04 VM. Proceed?" 10 58; then
: :
else else
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
fi fi
function msg_info() { function msg_info() {
@ -121,7 +121,7 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
@ -226,7 +226,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi 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 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 ' ') DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
@ -241,7 +241,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi fi
if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ 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 \ "0" "None (Default)" ON \
"1" "Write Through" OFF \ "1" "Write Through" OFF \
@ -493,11 +493,11 @@ EOF
) )
qm set "$VMID" -description "$DESCRIPTION" >/dev/null qm set "$VMID" -description "$DESCRIPTION" >/dev/null
if [ -n "$DISK_SIZE" ]; then if [ -n "$DISK_SIZE" ]; then
msg_info "Resizing disk to $DISK_SIZE GB" msg_info "Resizing disk to $DISK_SIZE GB"
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
else else
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
fi fi
msg_ok "Created a Ubuntu 22.04 VM ${CL}${BL}(${HN})" msg_ok "Created a Ubuntu 22.04 VM ${CL}${BL}(${HN})"

View File

@ -29,7 +29,7 @@ var_os="ubuntu"
var_version="2404" var_version="2404"
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
RD=$(echo "\033[01;31m") RD=$(echo "\033[01;31m")
BGN=$(echo "\033[4;92m") BGN=$(echo "\033[4;92m")
GN=$(echo "\033[1;92m") GN=$(echo "\033[1;92m")
@ -64,7 +64,7 @@ THIN="discard=on,ssd=1,"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -93,7 +93,7 @@ pushd $TEMP_DIR >/dev/null
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.04 VM" --yesno "This will create a New Ubuntu 24.04 VM. Proceed?" 10 58; then if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.04 VM" --yesno "This will create a New Ubuntu 24.04 VM. Proceed?" 10 58; then
: :
else else
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
fi fi
function msg_info() { function msg_info() {
@ -122,7 +122,7 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
@ -227,7 +227,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi 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 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 ' ') DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
@ -242,7 +242,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi fi
if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ 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 \ "0" "None (Default)" ON \
"1" "Write Through" OFF \ "1" "Write Through" OFF \
@ -493,11 +493,11 @@ EOF
) )
qm set "$VMID" -description "$DESCRIPTION" >/dev/null qm set "$VMID" -description "$DESCRIPTION" >/dev/null
if [ -n "$DISK_SIZE" ]; then if [ -n "$DISK_SIZE" ]; then
msg_info "Resizing disk to $DISK_SIZE GB" msg_info "Resizing disk to $DISK_SIZE GB"
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
else else
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
fi fi
msg_ok "Created a Ubuntu 24.04 VM ${CL}${BL}(${HN})" msg_ok "Created a Ubuntu 24.04 VM ${CL}${BL}(${HN})"

View File

@ -63,7 +63,7 @@ THIN="discard=on,ssd=1,"
set -e set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
function error_handler() { function error_handler() {
local exit_code="$?" local exit_code="$?"
@ -92,7 +92,7 @@ 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 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 else
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
fi fi
function msg_info() { function msg_info() {
@ -121,7 +121,7 @@ function check_root() {
} }
function pve_check() { function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Exiting..." echo -e "Exiting..."
@ -226,7 +226,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi 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 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 ' ') DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
@ -241,7 +241,7 @@ function advanced_settings() {
else else
exit-script exit-script
fi fi
if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ 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 \ "0" "None (Default)" ON \
"1" "Write Through" OFF \ "1" "Write Through" OFF \
@ -493,11 +493,11 @@ EOF
) )
qm set "$VMID" -description "$DESCRIPTION" >/dev/null qm set "$VMID" -description "$DESCRIPTION" >/dev/null
if [ -n "$DISK_SIZE" ]; then if [ -n "$DISK_SIZE" ]; then
msg_info "Resizing disk to $DISK_SIZE GB" msg_info "Resizing disk to $DISK_SIZE GB"
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
else else
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
fi fi
msg_ok "Created a Ubuntu 24.10 VM ${CL}${BL}(${HN})" msg_ok "Created a Ubuntu 24.10 VM ${CL}${BL}(${HN})"