mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-20 17:03:05 +01:00
Compare commits
3 Commits
copilot/sc
...
MickLesk-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
102805f8ce | ||
|
|
5c0a8d682d | ||
|
|
2cc0c738ed |
37
CHANGELOG.md
37
CHANGELOG.md
@@ -423,27 +423,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 2026-03-20
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- iSponsorBlockTV ([#13123](https://github.com/community-scripts/ProxmoxVE/pull/13123))
|
|
||||||
- Alpine-Wakapi ([#13119](https://github.com/community-scripts/ProxmoxVE/pull/13119))
|
|
||||||
- teleport ([#13086](https://github.com/community-scripts/ProxmoxVE/pull/13086))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- Immich: v2.6.1 [@vhsdream](https://github.com/vhsdream) ([#13111](https://github.com/community-scripts/ProxmoxVE/pull/13111))
|
|
||||||
- VM's: add input validation and hostname sanitization to all VM scripts [@MickLesk](https://github.com/MickLesk) ([#12973](https://github.com/community-scripts/ProxmoxVE/pull/12973))
|
|
||||||
|
|
||||||
### 🧰 Tools
|
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- Harden code-server addon install script [@MickLesk](https://github.com/MickLesk) ([#13116](https://github.com/community-scripts/ProxmoxVE/pull/13116))
|
|
||||||
|
|
||||||
## 2026-03-19
|
## 2026-03-19
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
@@ -452,28 +431,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
- fix: remove extra backslash to match single quoted here-doc [@Zelnes](https://github.com/Zelnes) ([#13108](https://github.com/community-scripts/ProxmoxVE/pull/13108))
|
|
||||||
- Reactive-Resume: Upgrade Node to 24 and enable Corepack [@MickLesk](https://github.com/MickLesk) ([#13093](https://github.com/community-scripts/ProxmoxVE/pull/13093))
|
|
||||||
- Increase Tracearr RAM; derive APP_VERSION [@MickLesk](https://github.com/MickLesk) ([#13087](https://github.com/community-scripts/ProxmoxVE/pull/13087))
|
- Increase Tracearr RAM; derive APP_VERSION [@MickLesk](https://github.com/MickLesk) ([#13087](https://github.com/community-scripts/ProxmoxVE/pull/13087))
|
||||||
- ProjectSend: Update application access URL [@tremor021](https://github.com/tremor021) ([#13078](https://github.com/community-scripts/ProxmoxVE/pull/13078))
|
- ProjectSend: Update application access URL [@tremor021](https://github.com/tremor021) ([#13078](https://github.com/community-scripts/ProxmoxVE/pull/13078))
|
||||||
- Dispatcharr: use npm install --no-audit --progress=false [@MickLesk](https://github.com/MickLesk) ([#13074](https://github.com/community-scripts/ProxmoxVE/pull/13074))
|
- Dispatcharr: use npm install --no-audit --progress=false [@MickLesk](https://github.com/MickLesk) ([#13074](https://github.com/community-scripts/ProxmoxVE/pull/13074))
|
||||||
- core: reorder hwaccel setup and adjust GPU group usermod [@MickLesk](https://github.com/MickLesk) ([#13072](https://github.com/community-scripts/ProxmoxVE/pull/13072))
|
- core: reorder hwaccel setup and adjust GPU group usermod [@MickLesk](https://github.com/MickLesk) ([#13072](https://github.com/community-scripts/ProxmoxVE/pull/13072))
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- tools.func: display pin reason in release-check messages [@MickLesk](https://github.com/MickLesk) ([#13095](https://github.com/community-scripts/ProxmoxVE/pull/13095))
|
|
||||||
- NocoDB: Unpin Version to latest [@MickLesk](https://github.com/MickLesk) ([#13094](https://github.com/community-scripts/ProxmoxVE/pull/13094))
|
|
||||||
|
|
||||||
### 💾 Core
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- tools.func: use dpkg-query for reliable JDK version detection [@MickLesk](https://github.com/MickLesk) ([#13101](https://github.com/community-scripts/ProxmoxVE/pull/13101))
|
|
||||||
|
|
||||||
### 📚 Documentation
|
### 📚 Documentation
|
||||||
|
|
||||||
- Update link from helper-scripts.com to community-scripts.org [@adnanvaldes](https://github.com/adnanvaldes) ([#13098](https://github.com/community-scripts/ProxmoxVE/pull/13098))
|
- github: add PocketBase bot workflow [@MickLesk](https://github.com/MickLesk) ([#13075](https://github.com/community-scripts/ProxmoxVE/pull/13075))
|
||||||
- github: add PocketBase bot workflow [@MickLesk](https://github.com/MickLesk) ([#13075](https://github.com/community-scripts/ProxmoxVE/pull/13075))
|
|
||||||
|
|
||||||
## 2026-03-18
|
## 2026-03-18
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ Choose your preferred installation method:
|
|||||||
|
|
||||||
The fastest way to get started:
|
The fastest way to get started:
|
||||||
|
|
||||||
1. Visit **[community-scripts.org](https://community-scripts.org/)** 🌐
|
1. Visit **[helper-scripts.com](https://helper-scripts.com/)** 🌐
|
||||||
2. Search for your desired script (e.g., "Home Assistant", "Docker")
|
2. Search for your desired script (e.g., "Home Assistant", "Docker")
|
||||||
3. Copy the bash command displayed on the script page
|
3. Copy the bash command displayed on the script page
|
||||||
4. Open your **Proxmox Shell** and paste the command
|
4. Open your **Proxmox Shell** and paste the command
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://wakapi.dev/ | https://github.com/muety/wakapi
|
|
||||||
|
|
||||||
APP="Alpine-Wakapi"
|
|
||||||
var_tags="${var_tags:-code;time-tracking}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-512}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-alpine}"
|
|
||||||
var_version="${var_version:-3.23}"
|
|
||||||
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/wakapi ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/muety/wakapi/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
|
||||||
if [ "${RELEASE}" != "$(cat ~/.wakapi 2>/dev/null)" ] || [ ! -f ~/.wakapi ]; then
|
|
||||||
msg_info "Stopping Wakapi Service"
|
|
||||||
$STD rc-service wakapi stop
|
|
||||||
msg_ok "Stopped Wakapi Service"
|
|
||||||
|
|
||||||
msg_info "Updating Wakapi LXC"
|
|
||||||
$STD apk -U upgrade
|
|
||||||
msg_ok "Updated Wakapi LXC"
|
|
||||||
|
|
||||||
msg_info "Creating backup"
|
|
||||||
mkdir -p /opt/wakapi-backup
|
|
||||||
cp /opt/wakapi/config.yml /opt/wakapi/wakapi_db.db /opt/wakapi-backup/
|
|
||||||
msg_ok "Created backup"
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wakapi" "muety/wakapi" "tarball"
|
|
||||||
|
|
||||||
msg_info "Configuring Wakapi"
|
|
||||||
cd /opt/wakapi
|
|
||||||
$STD go mod download
|
|
||||||
$STD go build -o wakapi
|
|
||||||
cp /opt/wakapi-backup/config.yml /opt/wakapi/
|
|
||||||
cp /opt/wakapi-backup/wakapi_db.db /opt/wakapi/
|
|
||||||
rm -rf /opt/wakapi-backup
|
|
||||||
msg_ok "Configured Wakapi"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
$STD rc-service wakapi start
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
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}"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
___ __ _ _ __ __ _
|
|
||||||
/ | / /___ (_)___ ___ | | / /___ _/ /______ _____ (_)
|
|
||||||
/ /| | / / __ \/ / __ \/ _ \_____| | /| / / __ `/ //_/ __ `/ __ \/ /
|
|
||||||
/ ___ |/ / /_/ / / / / / __/_____/ |/ |/ / /_/ / ,< / /_/ / /_/ / /
|
|
||||||
/_/ |_/_/ .___/_/_/ /_/\___/ |__/|__/\__,_/_/|_|\__,_/ .___/_/
|
|
||||||
/_/ /_/
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
_ _____ ____ __ __ _______ __
|
|
||||||
(_) ___/____ ____ ____ _________ _____/ __ )/ /___ _____/ /_/_ __/ | / /
|
|
||||||
/ /\__ \/ __ \/ __ \/ __ \/ ___/ __ \/ ___/ __ / / __ \/ ___/ //_// / | | / /
|
|
||||||
/ /___/ / /_/ / /_/ / / / (__ ) /_/ / / / /_/ / / /_/ / /__/ ,< / / | |/ /
|
|
||||||
/_//____/ .___/\____/_/ /_/____/\____/_/ /_____/_/\____/\___/_/|_|/_/ |___/
|
|
||||||
/_/
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
______ __ __
|
|
||||||
/_ __/__ / /__ ____ ____ _____/ /_
|
|
||||||
/ / / _ \/ / _ \/ __ \/ __ \/ ___/ __/
|
|
||||||
/ / / __/ / __/ /_/ / /_/ / / / /_
|
|
||||||
/_/ \___/_/\___/ .___/\____/_/ \__/
|
|
||||||
/_/
|
|
||||||
17
ct/immich.sh
17
ct/immich.sh
@@ -83,7 +83,7 @@ EOF
|
|||||||
)
|
)
|
||||||
INTEL_RELEASE="$(grep "intel-opencl-icd_" ./Dockerfile | awk -F '_' '{print $2}')"
|
INTEL_RELEASE="$(grep "intel-opencl-icd_" ./Dockerfile | awk -F '_' '{print $2}')"
|
||||||
if [[ "$INTEL_RELEASE" != "$(cat ~/.intel_version)" ]]; then
|
if [[ "$INTEL_RELEASE" != "$(cat ~/.intel_version)" ]]; then
|
||||||
msg_info "Updating Intel OpenVINO dependencies"
|
msg_info "Updating Intel iGPU dependencies"
|
||||||
for url in "${INTEL_URLS[@]}"; do
|
for url in "${INTEL_URLS[@]}"; do
|
||||||
curl_with_retry "$url" "$(basename "$url")"
|
curl_with_retry "$url" "$(basename "$url")"
|
||||||
done
|
done
|
||||||
@@ -94,9 +94,9 @@ EOF
|
|||||||
rm ./*.deb
|
rm ./*.deb
|
||||||
$STD apt-mark hold libigdgmm12
|
$STD apt-mark hold libigdgmm12
|
||||||
dpkg-query -W -f='${Version}\n' intel-opencl-icd >~/.intel_version
|
dpkg-query -W -f='${Version}\n' intel-opencl-icd >~/.intel_version
|
||||||
rm -f ./Dockerfile
|
msg_ok "Intel iGPU dependencies updated"
|
||||||
msg_ok "Updated Intel OpenVINO dependencies"
|
|
||||||
fi
|
fi
|
||||||
|
rm ./Dockerfile
|
||||||
fi
|
fi
|
||||||
if [[ -f ~/.immich_library_revisions ]]; then
|
if [[ -f ~/.immich_library_revisions ]]; then
|
||||||
libraries=("libjxl" "libheif" "libraw" "imagemagick" "libvips")
|
libraries=("libjxl" "libheif" "libraw" "imagemagick" "libvips")
|
||||||
@@ -109,8 +109,8 @@ EOF
|
|||||||
msg_ok "Image-processing libraries up to date"
|
msg_ok "Image-processing libraries up to date"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE="v2.6.1"
|
RELEASE="v2.5.6"
|
||||||
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}"; then
|
||||||
if [[ $(cat ~/.immich) > "2.5.1" ]]; then
|
if [[ $(cat ~/.immich) > "2.5.1" ]]; then
|
||||||
msg_info "Enabling Maintenance Mode"
|
msg_info "Enabling Maintenance Mode"
|
||||||
cd /opt/immich/app/bin
|
cd /opt/immich/app/bin
|
||||||
@@ -125,7 +125,7 @@ EOF
|
|||||||
msg_ok "Stopped Services"
|
msg_ok "Stopped Services"
|
||||||
VCHORD_RELEASE="0.5.3"
|
VCHORD_RELEASE="0.5.3"
|
||||||
[[ -f ~/.vchord_version ]] && mv ~/.vchord_version ~/.vectorchord
|
[[ -f ~/.vchord_version ]] && mv ~/.vchord_version ~/.vectorchord
|
||||||
if check_for_gh_release "VectorChord" "tensorchord/VectorChord" "${VCHORD_RELEASE}" "updated together with Immich after testing"; then
|
if check_for_gh_release "VectorChord" "tensorchord/VectorChord" "${VCHORD_RELEASE}"; then
|
||||||
fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-16-vchord_*_amd64.deb"
|
fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-16-vchord_*_amd64.deb"
|
||||||
systemctl restart postgresql
|
systemctl restart postgresql
|
||||||
$STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;"
|
$STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;"
|
||||||
@@ -226,13 +226,14 @@ EOF
|
|||||||
[[ $attempt -lt 3 ]] && msg_warn "Python download attempt $attempt failed, retrying..." && sleep 5
|
[[ $attempt -lt 3 ]] && msg_warn "Python download attempt $attempt failed, retrying..." && sleep 5
|
||||||
done
|
done
|
||||||
msg_ok "Pre-installed Python ${ML_PYTHON}"
|
msg_ok "Pre-installed Python ${ML_PYTHON}"
|
||||||
msg_info "Updating Intel OpenVINO machine-learning"
|
msg_info "Updating HW-accelerated machine-learning"
|
||||||
|
$STD uv add --no-sync --optional openvino onnxruntime-openvino==1.24.1 --active -n -p "${ML_PYTHON}" --managed-python
|
||||||
for attempt in $(seq 1 3); do
|
for attempt in $(seq 1 3); do
|
||||||
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -nu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -nu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
||||||
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||||
done
|
done
|
||||||
patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.13/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-313-x86_64-linux-gnu.so"
|
patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.13/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-313-x86_64-linux-gnu.so"
|
||||||
msg_ok "Updated Intel OpenVINO machine-learning"
|
msg_ok "Updated HW-accelerated machine-learning"
|
||||||
else
|
else
|
||||||
ML_PYTHON="python3.11"
|
ML_PYTHON="python3.11"
|
||||||
msg_info "Pre-installing Python ${ML_PYTHON} for machine-learning"
|
msg_info "Pre-installing Python ${ML_PYTHON} for machine-learning"
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Matthew Stern (sternma) | MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/dmunozv04/iSponsorBlockTV
|
|
||||||
|
|
||||||
APP="iSponsorBlockTV"
|
|
||||||
var_tags="${var_tags:-media;automation}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
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/isponsorblocktv ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV"; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
systemctl stop isponsorblocktv
|
|
||||||
msg_ok "Stopped Service"
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-*-linux"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
systemctl start isponsorblocktv
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
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} Run the setup wizard inside the container with:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}iSponsorBlockTV setup${CL}"
|
|
||||||
@@ -30,7 +30,7 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
RELEASE="v5.2.0"
|
RELEASE="v5.2.0"
|
||||||
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}"; then
|
||||||
msg_info "Stopping services"
|
msg_info "Stopping services"
|
||||||
systemctl stop opencloud opencloud-wopi
|
systemctl stop opencloud opencloud-wopi
|
||||||
msg_ok "Stopped services"
|
msg_ok "Stopped services"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
if check_for_gh_release "plant-it" "MDeLuise/plant-it" "${RELEASE}" "last version that includes the web frontend"; then
|
if check_for_gh_release "plant-it" "MDeLuise/plant-it" "${RELEASE}"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop plant-it
|
systemctl stop plant-it
|
||||||
msg_info "Stopped Service"
|
msg_info "Stopped Service"
|
||||||
|
|||||||
@@ -34,14 +34,10 @@ function update_script() {
|
|||||||
msg_ok "Stopped services"
|
msg_ok "Stopped services"
|
||||||
|
|
||||||
cp /opt/reactive-resume/.env /opt/reactive-resume.env.bak
|
cp /opt/reactive-resume/.env /opt/reactive-resume.env.bak
|
||||||
NODE_VERSION="24" setup_nodejs
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume"
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume"
|
||||||
|
|
||||||
msg_info "Updating Reactive Resume (Patience)"
|
msg_info "Updating Reactive Resume (Patience)"
|
||||||
cd /opt/reactive-resume
|
cd /opt/reactive-resume
|
||||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
|
||||||
corepack enable
|
|
||||||
corepack prepare --activate
|
|
||||||
export CI="true"
|
export CI="true"
|
||||||
export NODE_ENV="production"
|
export NODE_ENV="production"
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
|
|
||||||
APP="Scanopy"
|
APP="Scanopy"
|
||||||
var_tags="${var_tags:-analytics}"
|
var_tags="${var_tags:-analytics}"
|
||||||
var_cpu="${var_cpu:-4}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-4096}"
|
var_ram="${var_ram:-3072}"
|
||||||
var_disk="${var_disk:-8}"
|
var_disk="${var_disk:-6}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://goteleport.com/
|
|
||||||
|
|
||||||
APP="Teleport"
|
|
||||||
var_tags="${var_tags:-zero-trust}"
|
|
||||||
var_cpu="${var_cpu:-1}"
|
|
||||||
var_ram="${var_ram:-1024}"
|
|
||||||
var_disk="${var_disk:-4}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
if [[ ! -f /etc/teleport.yaml ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Updating Teleport"
|
|
||||||
$STD apt update
|
|
||||||
$STD apt upgrade -y
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
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}:3080${CL}"
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://wakapi.dev/ | https://github.com/muety/wakapi
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apk add --no-cache \
|
|
||||||
ca-certificates \
|
|
||||||
tzdata
|
|
||||||
$STD update-ca-certificates
|
|
||||||
$STD apk add --no-cache go --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "wakapi" "muety/wakapi" "tarball"
|
|
||||||
|
|
||||||
msg_info "Configuring Wakapi"
|
|
||||||
LOCAL_IP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
|
|
||||||
cd /opt/wakapi
|
|
||||||
$STD go mod download
|
|
||||||
$STD go build -o wakapi
|
|
||||||
cp config.default.yml config.yml
|
|
||||||
sed -i 's/listen_ipv6: ::1/listen_ipv6: "-"/g' config.yml
|
|
||||||
sed -i 's/listen_ipv4: 127.0.0.1/listen_ipv4: "0.0.0.0"/g' config.yml
|
|
||||||
sed -i "s/public_url: http:\/\/localhost:3000/public_url: http:\/\/$LOCAL_IP:3000/g" config.yml
|
|
||||||
msg_ok "Configured Wakapi"
|
|
||||||
|
|
||||||
msg_info "Enabling Wakapi Service"
|
|
||||||
cat <<EOF >/etc/init.d/wakapi
|
|
||||||
#!/sbin/openrc-run
|
|
||||||
description="Wakapi Service"
|
|
||||||
directory="/opt/wakapi"
|
|
||||||
command="/opt/wakapi/wakapi"
|
|
||||||
command_args="-config config.yml"
|
|
||||||
command_background="true"
|
|
||||||
command_user="root"
|
|
||||||
pidfile="/var/run/wakapi.pid"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
chmod +x /etc/init.d/wakapi
|
|
||||||
$STD rc-update add wakapi default
|
|
||||||
msg_ok "Enabled Wakapi Service"
|
|
||||||
|
|
||||||
msg_info "Starting Wakapi"
|
|
||||||
$STD rc-service wakapi start
|
|
||||||
msg_ok "Started Wakapi"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
@@ -13,43 +13,41 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
if lscpu | grep -q 'GenuineIntel'; then
|
if [ -d /dev/dri ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "🤖 ${BL}Immich Machine-Learning Options${CL}"
|
echo -e "🤖 ${BL}Immich Machine Learning Options${CL}"
|
||||||
echo "─────────────────────────────────────────"
|
echo "─────────────────────────────────────────"
|
||||||
echo "Please choose your machine-learning type:"
|
echo "Please choose your machine-learning type:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " 1) CPU only (default)"
|
echo " 1) CPU only (default)"
|
||||||
echo " 2) **NEW** Intel OpenVINO CPU or iGPU"
|
echo " 2) Intel OpenVINO (requires GPU passthrough)"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
read -r -p "${TAB3}Select machine-learning type [1]: " ML_TYPE
|
read -r -p "${TAB3}Select machine-learning type [1]: " ML_TYPE
|
||||||
ML_TYPE="${ML_TYPE:-1}"
|
ML_TYPE="${ML_TYPE:-1}"
|
||||||
if [[ "$ML_TYPE" == "2" ]]; then
|
if [[ "$ML_TYPE" == "2" ]]; then
|
||||||
|
msg_info "Installing OpenVINO dependencies"
|
||||||
touch ~/.openvino
|
touch ~/.openvino
|
||||||
$STD apt install -y --no-install-recommends patchelf
|
$STD apt install -y --no-install-recommends patchelf
|
||||||
if [[ -d /dev/dri ]]; then
|
tmp_dir=$(mktemp -d)
|
||||||
msg_info "Installing Intel OpenVINO dependencies"
|
$STD pushd "$tmp_dir"
|
||||||
tmp_dir=$(mktemp -d)
|
curl_with_retry "https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile" "Dockerfile"
|
||||||
$STD pushd "$tmp_dir"
|
readarray -t INTEL_URLS < <(
|
||||||
curl_with_retry "https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile" "Dockerfile"
|
sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $3}'
|
||||||
readarray -t INTEL_URLS < <(
|
sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}'
|
||||||
sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $3}'
|
)
|
||||||
sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}'
|
for url in "${INTEL_URLS[@]}"; do
|
||||||
)
|
curl_with_retry "$url" "$(basename "$url")"
|
||||||
for url in "${INTEL_URLS[@]}"; do
|
done
|
||||||
curl_with_retry "$url" "$(basename "$url")"
|
$STD apt install -y ./libigdgmm12*.deb
|
||||||
done
|
rm ./libigdgmm12*.deb
|
||||||
$STD apt install -y ./libigdgmm12*.deb
|
$STD apt install -y ./*.deb
|
||||||
rm ./libigdgmm12*.deb
|
$STD apt-mark hold libigdgmm12
|
||||||
$STD apt install -y ./*.deb
|
$STD popd
|
||||||
$STD apt-mark hold libigdgmm12
|
rm -rf "$tmp_dir"
|
||||||
$STD popd
|
dpkg-query -W -f='${Version}\n' intel-opencl-icd >~/.intel_version
|
||||||
rm -rf "$tmp_dir"
|
msg_ok "Installed OpenVINO dependencies"
|
||||||
dpkg-query -W -f='${Version}\n' intel-opencl-icd >~/.intel_version
|
|
||||||
msg_ok "Installed Intel OpenVINO dependencies"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -295,7 +293,7 @@ ML_DIR="${APP_DIR}/machine-learning"
|
|||||||
GEO_DIR="${INSTALL_DIR}/geodata"
|
GEO_DIR="${INSTALL_DIR}/geodata"
|
||||||
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
|
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v2.6.1" "$SRC_DIR"
|
fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v2.5.6" "$SRC_DIR"
|
||||||
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1] | split("+")[0]' ${SRC_DIR}/package.json)"
|
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1] | split("+")[0]' ${SRC_DIR}/package.json)"
|
||||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
|
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
|
||||||
|
|
||||||
@@ -355,13 +353,14 @@ if [[ -f ~/.openvino ]]; then
|
|||||||
[[ $attempt -lt 3 ]] && msg_warn "Python download attempt $attempt failed, retrying..." && sleep 5
|
[[ $attempt -lt 3 ]] && msg_warn "Python download attempt $attempt failed, retrying..." && sleep 5
|
||||||
done
|
done
|
||||||
msg_ok "Pre-installed Python ${ML_PYTHON}"
|
msg_ok "Pre-installed Python ${ML_PYTHON}"
|
||||||
msg_info "Installing Intel OpenVINO machine-learning"
|
msg_info "Installing HW-accelerated machine-learning"
|
||||||
|
$STD uv add --no-sync --optional openvino onnxruntime-openvino==1.24.1 --active -n -p "${ML_PYTHON}" --managed-python
|
||||||
for attempt in $(seq 1 3); do
|
for attempt in $(seq 1 3); do
|
||||||
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -nu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
$STD sudo --preserve-env=VIRTUAL_ENV,UV_HTTP_TIMEOUT -nu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p "${ML_PYTHON}" --managed-python && break
|
||||||
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
[[ $attempt -lt 3 ]] && msg_warn "uv sync attempt $attempt failed, retrying..." && sleep 10
|
||||||
done
|
done
|
||||||
patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.13/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-313-x86_64-linux-gnu.so"
|
patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.13/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-313-x86_64-linux-gnu.so"
|
||||||
msg_ok "Installed Intel OpenVINO machine-learning"
|
msg_ok "Installed HW-accelerated machine-learning"
|
||||||
else
|
else
|
||||||
ML_PYTHON="python3.11"
|
ML_PYTHON="python3.11"
|
||||||
msg_info "Pre-installing Python ${ML_PYTHON} for machine-learning"
|
msg_info "Pre-installing Python ${ML_PYTHON} for machine-learning"
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Matthew Stern (sternma) | MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/dmunozv04/iSponsorBlockTV
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-*-linux"
|
|
||||||
|
|
||||||
msg_info "Setting up iSponsorBlockTV"
|
|
||||||
install -d /var/lib/isponsorblocktv
|
|
||||||
msg_ok "Set up iSponsorBlockTV"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<EOF >/etc/systemd/system/isponsorblocktv.service
|
|
||||||
[Unit]
|
|
||||||
Description=iSponsorBlockTV
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
Group=root
|
|
||||||
Environment=iSPBTV_data_dir=/var/lib/isponsorblocktv
|
|
||||||
ExecStart=/opt/isponsorblocktv/isponsorblocktv
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q isponsorblocktv
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
msg_info "Creating CLI wrapper"
|
|
||||||
cat <<EOF >/usr/local/bin/iSponsorBlockTV
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
export iSPBTV_data_dir="/var/lib/isponsorblocktv"
|
|
||||||
|
|
||||||
set +e
|
|
||||||
/opt/isponsorblocktv/isponsorblocktv "$@"
|
|
||||||
status=$?
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case "${1:-}" in
|
|
||||||
setup|setup-cli)
|
|
||||||
systemctl restart isponsorblocktv >/dev/null 2>&1 || true
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $status
|
|
||||||
EOF
|
|
||||||
chmod +x /usr/local/bin/iSponsorBlockTV
|
|
||||||
ln -sf /usr/local/bin/iSponsorBlockTV /usr/bin/iSponsorBlockTV
|
|
||||||
msg_ok "Created CLI wrapper"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -36,7 +36,7 @@ ExecStart=/usr/local/bin/prometheus \
|
|||||||
--config.file=/etc/prometheus/prometheus.yml \
|
--config.file=/etc/prometheus/prometheus.yml \
|
||||||
--storage.tsdb.path=/var/lib/prometheus/ \
|
--storage.tsdb.path=/var/lib/prometheus/ \
|
||||||
--web.listen-address=0.0.0.0:9090
|
--web.listen-address=0.0.0.0:9090
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP \$MAINPID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ update_os
|
|||||||
|
|
||||||
PG_VERSION="16" setup_postgresql
|
PG_VERSION="16" setup_postgresql
|
||||||
PG_DB_NAME="reactive_resume" PG_DB_USER="reactive_resume" setup_postgresql_db
|
PG_DB_NAME="reactive_resume" PG_DB_USER="reactive_resume" setup_postgresql_db
|
||||||
NODE_VERSION="24" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y chromium
|
$STD apt install -y chromium
|
||||||
@@ -25,9 +25,6 @@ fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "ta
|
|||||||
|
|
||||||
msg_info "Building Reactive Resume (Patience)"
|
msg_info "Building Reactive Resume (Patience)"
|
||||||
cd /opt/reactive-resume
|
cd /opt/reactive-resume
|
||||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
|
||||||
corepack enable
|
|
||||||
corepack prepare --activate
|
|
||||||
export NODE_ENV="production"
|
export NODE_ENV="production"
|
||||||
export CI="true"
|
export CI="true"
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://goteleport.com/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
setup_deb822_repo \
|
|
||||||
"teleport" \
|
|
||||||
"https://deb.releases.teleport.dev/teleport-pubkey.asc" \
|
|
||||||
"https://apt.releases.teleport.dev/debian" \
|
|
||||||
"trixie" \
|
|
||||||
"stable/v18"
|
|
||||||
|
|
||||||
msg_info "Configuring Teleport"
|
|
||||||
$STD apt install -y teleport
|
|
||||||
$STD teleport configure -o /etc/teleport.yaml
|
|
||||||
systemctl enable -q --now teleport
|
|
||||||
sleep 10
|
|
||||||
tctl users add teleport-admin --roles=editor,access --logins=root >~/teleportadmin.txt
|
|
||||||
sed -i "s|https://[^:]*:3080|https://${LOCAL_IP}:3080|g" ~/teleportadmin.txt
|
|
||||||
msg_ok "Configured Teleport"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -2271,7 +2271,6 @@ check_for_gh_release() {
|
|||||||
local app="$1"
|
local app="$1"
|
||||||
local source="$2"
|
local source="$2"
|
||||||
local pinned_version_in="${3:-}" # optional
|
local pinned_version_in="${3:-}" # optional
|
||||||
local pin_reason="${4:-}" # optional reason shown to user
|
|
||||||
local app_lc=""
|
local app_lc=""
|
||||||
app_lc="$(echo "${app,,}" | tr -d ' ')"
|
app_lc="$(echo "${app,,}" | tr -d ' ')"
|
||||||
local current_file="$HOME/.${app_lc}"
|
local current_file="$HOME/.${app_lc}"
|
||||||
@@ -2445,11 +2444,7 @@ check_for_gh_release() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$pin_reason" ]]; then
|
msg_ok "No update available: ${app} is already on pinned version (${current})"
|
||||||
msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}"
|
|
||||||
else
|
|
||||||
msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases"
|
|
||||||
fi
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2488,7 +2483,6 @@ check_for_codeberg_release() {
|
|||||||
local app="$1"
|
local app="$1"
|
||||||
local source="$2"
|
local source="$2"
|
||||||
local pinned_version_in="${3:-}" # optional
|
local pinned_version_in="${3:-}" # optional
|
||||||
local pin_reason="${4:-}" # optional reason shown to user
|
|
||||||
local app_lc="${app,,}"
|
local app_lc="${app,,}"
|
||||||
local current_file="$HOME/.${app_lc}"
|
local current_file="$HOME/.${app_lc}"
|
||||||
|
|
||||||
@@ -2568,11 +2562,7 @@ check_for_codeberg_release() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$pin_reason" ]]; then
|
msg_ok "No update available: ${app} is already on pinned version (${current})"
|
||||||
msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}"
|
|
||||||
else
|
|
||||||
msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases"
|
|
||||||
fi
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -5363,7 +5353,24 @@ function setup_java() {
|
|||||||
|
|
||||||
# Get currently installed version
|
# Get currently installed version
|
||||||
local INSTALLED_VERSION=""
|
local INSTALLED_VERSION=""
|
||||||
INSTALLED_VERSION=$(dpkg-query -W -f '${Package}\n' 2>/dev/null | grep -oP '^temurin-\K[0-9]+(?=-jdk$)' | head -n1 || echo "")
|
if dpkg -l | grep -q "temurin-.*-jdk" 2>/dev/null; then
|
||||||
|
INSTALLED_VERSION=$(dpkg -l 2>/dev/null | awk '/temurin-.*-jdk/{print $2}' | grep -oP 'temurin-\K[0-9]+' | head -n1 || echo "")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Validate INSTALLED_VERSION is not empty if JDK package found
|
||||||
|
local JDK_COUNT=0
|
||||||
|
JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || true)
|
||||||
|
if [[ -z "$INSTALLED_VERSION" && "${JDK_COUNT:-0}" -gt 0 ]]; then
|
||||||
|
msg_warn "Found Temurin JDK but cannot determine version - attempting reinstall"
|
||||||
|
# Try to get actual package name for purge
|
||||||
|
local OLD_PACKAGE
|
||||||
|
OLD_PACKAGE=$(dpkg -l 2>/dev/null | awk '/temurin-.*-jdk/{print $2}' | head -n1 || echo "")
|
||||||
|
if [[ -n "$OLD_PACKAGE" ]]; then
|
||||||
|
msg_info "Removing existing package: $OLD_PACKAGE"
|
||||||
|
$STD apt purge -y "$OLD_PACKAGE" || true
|
||||||
|
fi
|
||||||
|
INSTALLED_VERSION="" # Reset to trigger fresh install
|
||||||
|
fi
|
||||||
|
|
||||||
# Scenario 1: Already at correct version
|
# Scenario 1: Already at correct version
|
||||||
if [[ "$INSTALLED_VERSION" == "$JAVA_VERSION" ]]; then
|
if [[ "$INSTALLED_VERSION" == "$JAVA_VERSION" ]]; then
|
||||||
|
|||||||
@@ -89,31 +89,26 @@ VERSION=$(curl -fsSL https://api.github.com/repos/coder/code-server/releases/lat
|
|||||||
awk '{print substr($2, 3, length($2)-4) }')
|
awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
|
||||||
msg_info "Installing Code-Server v${VERSION}"
|
msg_info "Installing Code-Server v${VERSION}"
|
||||||
config_path="${HOME}/.config/code-server/config.yaml"
|
|
||||||
preexisting_config=false
|
|
||||||
|
|
||||||
if [ -f "$config_path" ]; then
|
if [ -f ~/.config/code-server/config.yaml ]; then
|
||||||
preexisting_config=true
|
existing_config=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null
|
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null
|
||||||
dpkg -i code-server_"${VERSION}"_amd64.deb &>/dev/null
|
dpkg -i code-server_"${VERSION}"_amd64.deb &>/dev/null
|
||||||
rm -rf code-server_"${VERSION}"_amd64.deb
|
rm -rf code-server_"${VERSION}"_amd64.deb
|
||||||
mkdir -p "${HOME}/.config/code-server/"
|
mkdir -p ~/.config/code-server/
|
||||||
|
systemctl enable -q --now code-server@"$USER"
|
||||||
|
|
||||||
if [ "$preexisting_config" = false ]; then
|
if [ $existing_config = false ]; then
|
||||||
cat <<EOF >"$config_path"
|
cat <<EOF >~/.config/code-server/config.yaml
|
||||||
bind-addr: 0.0.0.0:8680
|
bind-addr: 0.0.0.0:8680
|
||||||
auth: none
|
auth: none
|
||||||
password:
|
password:
|
||||||
cert: false
|
cert: false
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
systemctl enable -q --now code-server@"$USER"
|
|
||||||
systemctl restart code-server@"$USER"
|
systemctl restart code-server@"$USER"
|
||||||
if ! systemctl is-active --quiet code-server@"$USER"; then
|
|
||||||
error_exit "code-server service failed to start."
|
|
||||||
fi
|
|
||||||
msg_ok "Installed Code-Server v${VERSION} on $hostname"
|
msg_ok "Installed Code-Server v${VERSION} on $hostname"
|
||||||
|
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
echo -e "${APP} should be reachable by going to the following URL.
|
||||||
|
|||||||
@@ -310,10 +310,7 @@ function advanced_settings() {
|
|||||||
HN="arch-linux"
|
HN="arch-linux"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo "${VM_NAME,,}" | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -335,31 +332,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z "$BRG" ]; then
|
||||||
@@ -372,61 +365,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -325,10 +325,7 @@ function advanced_settings() {
|
|||||||
HN="debian"
|
HN="debian"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo "${VM_NAME,,}" | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -350,31 +347,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z "$BRG" ]; then
|
||||||
@@ -387,61 +380,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
select_cloud_init
|
select_cloud_init
|
||||||
|
|
||||||
|
|||||||
117
vm/debian-vm.sh
117
vm/debian-vm.sh
@@ -315,10 +315,7 @@ function advanced_settings() {
|
|||||||
HN="debian"
|
HN="debian"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -340,31 +337,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -377,61 +370,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "CLOUD-INIT" --yesno "Configure the VM with Cloud-init?" --defaultno 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "CLOUD-INIT" --yesno "Configure the VM with Cloud-init?" --defaultno 10 58); then
|
||||||
echo -e "${CLOUD}${BOLD}${DGN}Configure Cloud-init: ${BGN}yes${CL}"
|
echo -e "${CLOUD}${BOLD}${DGN}Configure Cloud-init: ${BGN}yes${CL}"
|
||||||
|
|||||||
114
vm/docker-vm.sh
114
vm/docker-vm.sh
@@ -251,10 +251,7 @@ function advanced_settings() {
|
|||||||
if [ -z $VM_NAME ]; then
|
if [ -z $VM_NAME ]; then
|
||||||
HN="docker"
|
HN="docker"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
@@ -278,32 +275,24 @@ function advanced_settings() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# CPU Cores
|
# CPU Cores
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
|
||||||
exit_script
|
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
|
||||||
# RAM Size
|
# RAM Size
|
||||||
while true; do
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $RAM_SIZE ]; then
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="4096"; fi
|
RAM_SIZE="4096"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 4096)." 8 58
|
|
||||||
else
|
|
||||||
exit_script
|
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
|
||||||
# Bridge
|
# Bridge
|
||||||
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 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
|
||||||
@@ -316,63 +305,42 @@ function advanced_settings() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# MAC Address
|
# MAC Address
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit_script
|
MAC="$MAC1"
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
|
||||||
# VLAN
|
# VLAN
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit_script
|
VLAN=",tag=$VLAN1"
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
|
||||||
# MTU
|
# MTU
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit_script
|
MTU=",mtu=$MTU1"
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
|
||||||
# Start VM
|
# Start VM
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
|
|||||||
117
vm/haos-vm.sh
117
vm/haos-vm.sh
@@ -391,10 +391,7 @@ function advanced_settings() {
|
|||||||
HN="haos${BRANCH}"
|
HN="haos${BRANCH}"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -419,31 +416,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="4096"; fi
|
RAM_SIZE="4096"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 4096)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -456,61 +449,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -377,10 +377,7 @@ function advanced_settings() {
|
|||||||
HN="mikrotik-routeros-chr"
|
HN="mikrotik-routeros-chr"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -402,31 +399,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -439,61 +432,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -313,10 +313,7 @@ function advanced_settings() {
|
|||||||
HN="nextcloud-vm"
|
HN="nextcloud-vm"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -338,31 +335,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -375,61 +368,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
116
vm/openwrt-vm.sh
116
vm/openwrt-vm.sh
@@ -328,41 +328,30 @@ function advanced_settings() {
|
|||||||
if [ -z $VM_NAME ]; then
|
if [ -z $VM_NAME ]; then
|
||||||
HN="openwrt"
|
HN="openwrt"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 1 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $CORE_COUNT ]; then
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="1"; fi
|
CORE_COUNT="1"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 1)." 8 58
|
|
||||||
else
|
|
||||||
exit-script
|
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 256 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $RAM_SIZE ]; then
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="256"; fi
|
RAM_SIZE="256"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 256)." 8 58
|
|
||||||
else
|
|
||||||
exit-script
|
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
|
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" \
|
||||||
--inputbox "Set Disk Size in GiB (e.g., 1, 2, 4)" 8 58 "1" \
|
--inputbox "Set Disk Size in GiB (e.g., 1, 2, 4)" 8 58 "1" \
|
||||||
@@ -433,62 +422,41 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Vlan (leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Vlan (leave blank for default)" 8 58 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $VLAN1 ]; then
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
|
||||||
echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}"
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
if VLAN2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Vlan" 8 58 999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if VLAN2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Vlan" 8 58 999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $VLAN2 ]; then
|
||||||
if [ -z "$VLAN2" ]; then
|
VLAN2="Default"
|
||||||
VLAN2="Default"
|
LAN_VLAN=""
|
||||||
LAN_VLAN=""
|
|
||||||
echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN2" =~ ^[0-9]+$ ]] && [ "$VLAN2" -ge 1 ] && [ "$VLAN2" -le 4094 ]; then
|
|
||||||
LAN_VLAN=",tag=$VLAN2"
|
|
||||||
echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
LAN_VLAN=",tag=$VLAN2"
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}"
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
|
|||||||
@@ -421,41 +421,30 @@ function advanced_settings() {
|
|||||||
if [ -z "$VM_NAME" ]; then
|
if [ -z "$VM_NAME" ]; then
|
||||||
HN="OPNsense"
|
HN="OPNsense"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 4 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 4 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z "$CORE_COUNT" ]; then
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="4"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 4)." 8 58
|
|
||||||
else
|
|
||||||
exit-script
|
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 8192 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 8192 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $RAM_SIZE ]; then
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="8192"; fi
|
RAM_SIZE="8192"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 8192)." 8 58
|
|
||||||
else
|
|
||||||
exit-script
|
|
||||||
fi
|
fi
|
||||||
done
|
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
||||||
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $BRG ]; then
|
if [ -z $BRG ]; then
|
||||||
|
|||||||
@@ -314,10 +314,7 @@ function advanced_settings() {
|
|||||||
HN="owncloud-vm"
|
HN="owncloud-vm"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -339,31 +336,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -376,61 +369,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -274,35 +274,26 @@ function advanced_settings() {
|
|||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
while true; do
|
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)
|
||||||
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)
|
exitstatus=$?
|
||||||
exitstatus=$?
|
if [ -z $CORE_COUNT ]; then
|
||||||
if [ $exitstatus -ne 0 ]; then exit-script; fi
|
CORE_COUNT="2"
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
else
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"; fi
|
||||||
break
|
fi
|
||||||
fi
|
RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
exitstatus=$?
|
||||||
done
|
if [ -z $RAM_SIZE ]; then
|
||||||
while true; do
|
RAM_SIZE="4096"
|
||||||
RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 4096 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3)
|
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
||||||
exitstatus=$?
|
else
|
||||||
if [ $exitstatus -ne 0 ]; then exit-script; fi
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"; fi
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="4096"; fi
|
fi
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 4096)." 8 58
|
|
||||||
done
|
|
||||||
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)
|
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)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
if [ -z $BRG ]; then
|
if [ -z $BRG ]; then
|
||||||
@@ -311,56 +302,39 @@ function advanced_settings() {
|
|||||||
else
|
else
|
||||||
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
|
if [ $exitstatus = 0 ]; then echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"; fi
|
||||||
fi
|
fi
|
||||||
while true; do
|
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)
|
||||||
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)
|
exitstatus=$?
|
||||||
exitstatus=$?
|
if [ -z $MAC1 ]; then
|
||||||
if [ $exitstatus -ne 0 ]; then exit-script; fi
|
MAC="$GEN_MAC"
|
||||||
if [ -z "$MAC1" ]; then
|
echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"
|
||||||
MAC="$GEN_MAC"
|
else
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}$MAC${CL}"
|
if [ $exitstatus = 0 ]; then
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
MAC="$MAC1"
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
|
echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
|
||||||
break
|
|
||||||
fi
|
fi
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
fi
|
||||||
done
|
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)
|
||||||
while true; do
|
exitstatus=$?
|
||||||
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)
|
if [ $exitstatus = 0 ]; then
|
||||||
exitstatus=$?
|
if [ -z $VLAN1 ]; then
|
||||||
if [ $exitstatus -ne 0 ]; then exit-script; fi
|
VLAN1="Default" VLAN=""
|
||||||
if [ -z "$VLAN1" ]; then
|
|
||||||
VLAN1="Default"
|
|
||||||
VLAN=""
|
|
||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
||||||
break
|
else
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
VLAN=",tag=$VLAN1"
|
||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
||||||
break
|
|
||||||
fi
|
fi
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
fi
|
||||||
done
|
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)
|
||||||
while true; do
|
exitstatus=$?
|
||||||
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)
|
if [ $exitstatus = 0 ]; then
|
||||||
exitstatus=$?
|
if [ -z $MTU1 ]; then
|
||||||
if [ $exitstatus -ne 0 ]; then exit-script; fi
|
MTU1="Default" MTU=""
|
||||||
if [ -z "$MTU1" ]; then
|
|
||||||
MTU1="Default"
|
|
||||||
MTU=""
|
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
break
|
else
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
MTU=",mtu=$MTU1"
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
break
|
|
||||||
fi
|
fi
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
fi
|
||||||
done
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
START_VM="yes"
|
START_VM="yes"
|
||||||
|
|||||||
117
vm/truenas-vm.sh
117
vm/truenas-vm.sh
@@ -355,10 +355,7 @@ function advanced_settings() {
|
|||||||
if [ -z $VM_NAME ]; then
|
if [ -z $VM_NAME ]; then
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -383,31 +380,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 "$CORE_COUNT" --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 "$CORE_COUNT" --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $CORE_COUNT ]; then
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 "$RAM_SIZE" --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 "$RAM_SIZE" --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if [ -z $RAM_SIZE ]; then
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="8192"; fi
|
RAM_SIZE="8192"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 8192)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 "$BRG" --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 "$BRG" --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $BRG ]; then
|
if [ -z $BRG ]; then
|
||||||
@@ -420,61 +413,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IMPORT ONBOARD DISKS" --yesno "Would you like to import onboard disks?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IMPORT ONBOARD DISKS" --yesno "Would you like to import onboard disks?" 10 58); then
|
||||||
echo -e "${DISK}${BOLD}${DGN}Import onboard disks: ${BGN}yes${CL}"
|
echo -e "${DISK}${BOLD}${DGN}Import onboard disks: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -310,10 +310,7 @@ function advanced_settings() {
|
|||||||
HN="ubuntu"
|
HN="ubuntu"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -335,31 +332,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -372,61 +365,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -313,10 +313,7 @@ function advanced_settings() {
|
|||||||
HN="ubuntu"
|
HN="ubuntu"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -338,31 +335,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -375,61 +368,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -312,10 +312,7 @@ function advanced_settings() {
|
|||||||
HN="ubuntu"
|
HN="ubuntu"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -337,31 +334,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -374,61 +367,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
@@ -373,10 +373,7 @@ function advanced_settings() {
|
|||||||
HN="umbrelos"
|
HN="umbrelos"
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
HN=$(echo "${VM_NAME,,}" | tr -cs 'a-z0-9-' '-' | sed 's/^-//;s/-$//')
|
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||||
if [ "$HN" != "${VM_NAME,,}" ]; then
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "HOSTNAME ADJUSTED" --msgbox "Invalid characters detected. Hostname has been adjusted to:\n\n $HN" 10 58
|
|
||||||
fi
|
|
||||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -401,31 +398,27 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$CORE_COUNT" ]; then CORE_COUNT="2"; fi
|
CORE_COUNT="2"
|
||||||
if [[ "$CORE_COUNT" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "CPU Cores must be a positive integer (e.g., 2)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$RAM_SIZE" ]; then RAM_SIZE="2048"; fi
|
RAM_SIZE="2048"
|
||||||
if [[ "$RAM_SIZE" =~ ^[1-9][0-9]*$ ]]; then
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "RAM Size must be a positive integer in MiB (e.g., 2048)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
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 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
|
if [ -z $BRG ]; then
|
||||||
@@ -438,61 +431,43 @@ function advanced_settings() {
|
|||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MAC1" ]; then
|
MAC="$GEN_MAC"
|
||||||
MAC="$GEN_MAC"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MAC1" =~ ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ ]]; then
|
|
||||||
MAC="$MAC1"
|
|
||||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "Invalid MAC address format. Use XX:XX:XX:XX:XX:XX (e.g., AA:BB:CC:DD:EE:FF)." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MAC="$MAC1"
|
||||||
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$VLAN1" ]; then
|
VLAN1="Default"
|
||||||
VLAN1="Default"
|
VLAN=""
|
||||||
VLAN=""
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$VLAN1" =~ ^[0-9]+$ ]] && [ "$VLAN1" -ge 1 ] && [ "$VLAN1" -le 4094 ]; then
|
|
||||||
VLAN=",tag=$VLAN1"
|
|
||||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "VLAN must be a number between 1 and 4094, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
VLAN=",tag=$VLAN1"
|
||||||
|
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
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 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
|
||||||
if [ -z "$MTU1" ]; then
|
MTU1="Default"
|
||||||
MTU1="Default"
|
MTU=""
|
||||||
MTU=""
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ "$MTU1" =~ ^[0-9]+$ ]] && [ "$MTU1" -ge 576 ] && [ "$MTU1" -le 65520 ]; then
|
|
||||||
MTU=",mtu=$MTU1"
|
|
||||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID INPUT" --msgbox "MTU Size must be a number between 576 and 65520, or leave blank for default." 8 58
|
|
||||||
else
|
else
|
||||||
exit-script
|
MTU=",mtu=$MTU1"
|
||||||
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
fi
|
fi
|
||||||
done
|
else
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
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}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
|
|||||||
Reference in New Issue
Block a user