mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-26 16:50:19 +00:00
[core] remove unneeded vars from shellcheck (#3899)
* remove unneeded wars * Update alpine-wireguard-install.sh --------- Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
parent
d557d01161
commit
30e8cbf5b4
@ -31,7 +31,7 @@ function update_script() {
|
|||||||
|
|
||||||
if [[ -d /etc/wgdashboard/src ]]; then
|
if [[ -d /etc/wgdashboard/src ]]; then
|
||||||
msg_info "update WGDashboard"
|
msg_info "update WGDashboard"
|
||||||
cd /etc/wgdashboard/src || exit
|
cd /etc/wgdashboard/src
|
||||||
$STD echo "y" | ./wgd.sh update
|
$STD echo "y" | ./wgd.sh update
|
||||||
$STD ./wgd.sh start
|
$STD ./wgd.sh start
|
||||||
msg_ok "WGDashboard updated"
|
msg_ok "WGDashboard updated"
|
||||||
|
@ -42,7 +42,7 @@ function update_script() {
|
|||||||
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ || true
|
cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ || true
|
||||||
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ || true
|
cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ || true
|
||||||
cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ || true
|
cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ || true
|
||||||
cd /opt/bookstack || exit
|
cd /opt/bookstack
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
$STD composer install --no-dev
|
$STD composer install --no-dev
|
||||||
$STD php artisan migrate --force
|
$STD php artisan migrate --force
|
||||||
|
@ -200,11 +200,11 @@ if qm status "$CTID" &>/dev/null || pct status "$CTID" &>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Get template storage
|
# Get template storage
|
||||||
TEMPLATE_STORAGE=$(select_storage template) || exit
|
TEMPLATE_STORAGE=$(select_storage template)
|
||||||
msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."
|
msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."
|
||||||
|
|
||||||
# Get container storage
|
# Get container storage
|
||||||
CONTAINER_STORAGE=$(select_storage container) || exit
|
CONTAINER_STORAGE=$(select_storage container)
|
||||||
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
|
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
|
||||||
|
|
||||||
# Update LXC template list
|
# Update LXC template list
|
||||||
|
@ -32,7 +32,7 @@ function update_script() {
|
|||||||
msg_info "Updating ${APP}"
|
msg_info "Updating ${APP}"
|
||||||
systemctl stop ${APP}
|
systemctl stop ${APP}
|
||||||
git clone https://github.com/revenz/Fenrus.git
|
git clone https://github.com/revenz/Fenrus.git
|
||||||
cd Fenrus || exit
|
cd Fenrus
|
||||||
gitVersionNumber=$(git rev-parse HEAD)
|
gitVersionNumber=$(git rev-parse HEAD)
|
||||||
|
|
||||||
if [[ "${gitVersionNumber}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
if [[ "${gitVersionNumber}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||||
|
@ -50,7 +50,7 @@ function update_script() {
|
|||||||
curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||||
tar -xzf "$temp_file"
|
tar -xzf "$temp_file"
|
||||||
cp -rf "GoMFT-${RELEASE}"/* /opt/gomft/
|
cp -rf "GoMFT-${RELEASE}"/* /opt/gomft/
|
||||||
cd /opt/gomft || exit
|
cd /opt/gomft
|
||||||
rm -rf /opt/gomft/node_modules
|
rm -rf /opt/gomft/node_modules
|
||||||
$STD npm ci
|
$STD npm ci
|
||||||
$STD node build.js
|
$STD node build.js
|
||||||
|
@ -43,14 +43,14 @@ function update_script() {
|
|||||||
tar xzf "${RELEASE}".tar.gz
|
tar xzf "${RELEASE}".tar.gz
|
||||||
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
cp -R Heimdall-"${VER}"/* /opt/Heimdall
|
cp -R Heimdall-"${VER}"/* /opt/Heimdall
|
||||||
cd /opt/Heimdall || exit
|
cd /opt/Heimdall
|
||||||
$STD apt-get install -y composer
|
$STD apt-get install -y composer
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
$STD composer dump-autoload
|
$STD composer dump-autoload
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
|
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
|
||||||
msg_info "Restoring Data"
|
msg_info "Restoring Data"
|
||||||
cd ~ || exit
|
cd ~
|
||||||
cp -R database-backup/* /opt/Heimdall/database
|
cp -R database-backup/* /opt/Heimdall/database
|
||||||
cp -R public-backup/* /opt/Heimdall/public
|
cp -R public-backup/* /opt/Heimdall/public
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -40,7 +40,7 @@ function update_script() {
|
|||||||
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
||||||
$STD apt-get install -y graphicsmagick ghostscript
|
$STD apt-get install -y graphicsmagick ghostscript
|
||||||
fi
|
fi
|
||||||
cd /opt || exit
|
cd /opt
|
||||||
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
|
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
|
||||||
mkdir -p /etc/hoarder
|
mkdir -p /etc/hoarder
|
||||||
mv /opt/hoarder/.env /etc/hoarder/hoarder.env
|
mv /opt/hoarder/.env /etc/hoarder/hoarder.env
|
||||||
@ -49,14 +49,14 @@ function update_script() {
|
|||||||
curl -fsSL "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
curl -fsSL "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||||
unzip -q v"${RELEASE}".zip
|
unzip -q v"${RELEASE}".zip
|
||||||
mv karakeep-"${RELEASE}" /opt/hoarder
|
mv karakeep-"${RELEASE}" /opt/hoarder
|
||||||
cd /opt/hoarder/apps/web || exit
|
cd /opt/hoarder/apps/web
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
$STD pnpm exec next build --experimental-build-mode compile
|
$STD pnpm exec next build --experimental-build-mode compile
|
||||||
cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web
|
cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web
|
||||||
cd /opt/hoarder/apps/workers || exit
|
cd /opt/hoarder/apps/workers
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
export DATA_DIR=/opt/hoarder_data
|
export DATA_DIR=/opt/hoarder_data
|
||||||
cd /opt/hoarder/packages/db || exit
|
cd /opt/hoarder/packages/db
|
||||||
$STD pnpm migrate
|
$STD pnpm migrate
|
||||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
|
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
|
||||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||||
|
@ -40,7 +40,7 @@ function update_script() {
|
|||||||
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
if [[ "${PREV_RELEASE}" < 0.23.0 ]]; then
|
||||||
$STD apt-get install -y graphicsmagick ghostscript
|
$STD apt-get install -y graphicsmagick ghostscript
|
||||||
fi
|
fi
|
||||||
cd /opt || exit
|
cd /opt
|
||||||
if [[ -f /opt/karakeep/.env ]] && [[ ! -f /etc/karakeep/karakeep.env ]]; then
|
if [[ -f /opt/karakeep/.env ]] && [[ ! -f /etc/karakeep/karakeep.env ]]; then
|
||||||
mkdir -p /etc/karakeep
|
mkdir -p /etc/karakeep
|
||||||
mv /opt/karakeep/.env /etc/karakeep/karakeep.env
|
mv /opt/karakeep/.env /etc/karakeep/karakeep.env
|
||||||
@ -49,14 +49,14 @@ function update_script() {
|
|||||||
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||||
unzip -q "v${RELEASE}.zip"
|
unzip -q "v${RELEASE}.zip"
|
||||||
mv karakeep-"${RELEASE}" /opt/karakeep
|
mv karakeep-"${RELEASE}" /opt/karakeep
|
||||||
cd /opt/karakeep/apps/web || exit
|
cd /opt/karakeep/apps/web
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
$STD pnpm exec next build --experimental-build-mode compile
|
$STD pnpm exec next build --experimental-build-mode compile
|
||||||
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
||||||
cd /opt/karakeep/apps/workers || exit
|
cd /opt/karakeep/apps/workers
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
export DATA_DIR=/opt/karakeep_data
|
export DATA_DIR=/opt/karakeep_data
|
||||||
cd /opt/karakeep/packages/db || exit
|
cd /opt/karakeep/packages/db
|
||||||
$STD pnpm migrate
|
$STD pnpm migrate
|
||||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/karakeep/karakeep.env
|
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/karakeep/karakeep.env
|
||||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||||
|
@ -66,7 +66,7 @@ function update_script() {
|
|||||||
[ -f "$BACKUP_DIR/.env" ] && cp "$BACKUP_DIR/.env" /opt/kimai/
|
[ -f "$BACKUP_DIR/.env" ] && cp "$BACKUP_DIR/.env" /opt/kimai/
|
||||||
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
|
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
|
||||||
rm -rf "$BACKUP_DIR"
|
rm -rf "$BACKUP_DIR"
|
||||||
cd /opt/kimai || exit
|
cd /opt/kimai
|
||||||
$STD composer install --no-dev --optimize-autoloader
|
$STD composer install --no-dev --optimize-autoloader
|
||||||
$STD bin/console kimai:update
|
$STD bin/console kimai:update
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
@ -52,7 +52,7 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Downloading NPM v${RELEASE}"
|
msg_info "Downloading NPM v${RELEASE}"
|
||||||
curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz
|
curl -fsSL "https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE}" | tar -xz
|
||||||
cd nginx-proxy-manager-"${RELEASE}" || exit
|
cd nginx-proxy-manager-"${RELEASE}"
|
||||||
msg_ok "Downloaded NPM v${RELEASE}"
|
msg_ok "Downloaded NPM v${RELEASE}"
|
||||||
|
|
||||||
msg_info "Setting up Enviroment"
|
msg_info "Setting up Enviroment"
|
||||||
@ -103,7 +103,7 @@ function update_script() {
|
|||||||
msg_ok "Setup Enviroment"
|
msg_ok "Setup Enviroment"
|
||||||
|
|
||||||
msg_info "Building Frontend"
|
msg_info "Building Frontend"
|
||||||
cd ./frontend || exit
|
cd ./frontend
|
||||||
$STD pnpm install
|
$STD pnpm install
|
||||||
$STD pnpm upgrade
|
$STD pnpm upgrade
|
||||||
$STD pnpm run build
|
$STD pnpm run build
|
||||||
@ -128,7 +128,7 @@ function update_script() {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cd /app || exit
|
cd /app
|
||||||
$STD pnpm install
|
$STD pnpm install
|
||||||
msg_ok "Initialized Backend"
|
msg_ok "Initialized Backend"
|
||||||
|
|
||||||
|
@ -28,27 +28,26 @@ function update_script() {
|
|||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|
||||||
case "$UPD" in
|
case "$UPD" in
|
||||||
"1")
|
"1")
|
||||||
msg_info "Updating Alpine OS"
|
msg_info "Updating Alpine OS"
|
||||||
apk update && apk upgrade
|
apk update && apk upgrade
|
||||||
msg_ok "System updated"
|
msg_ok "System updated"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
"2")
|
"2")
|
||||||
msg_info "Updating NPMplus Container"
|
msg_info "Updating NPMplus Container"
|
||||||
cd /opt || exit 1
|
cd /opt 1
|
||||||
msg_info "Pulling latest container image"
|
msg_info "Pulling latest container image"
|
||||||
$STD docker compose pull
|
$STD docker compose pull
|
||||||
msg_info "Recreating container"
|
msg_info "Recreating container"
|
||||||
$STD docker compose up -d
|
$STD docker compose up -d
|
||||||
msg_ok "NPMplus container updated"
|
msg_ok "NPMplus container updated"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
start
|
start
|
||||||
build_container
|
build_container
|
||||||
description
|
description
|
||||||
|
@ -40,7 +40,7 @@ function update_script() {
|
|||||||
curl -fsSL "https://github.com/outline/outline/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
curl -fsSL "https://github.com/outline/outline/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||||
tar zxf "$temp_file"
|
tar zxf "$temp_file"
|
||||||
mv outline-"${RELEASE}" /opt/outline
|
mv outline-"${RELEASE}" /opt/outline
|
||||||
cd /opt/outline || exit
|
cd /opt/outline
|
||||||
export NODE_ENV=development
|
export NODE_ENV=development
|
||||||
export NODE_OPTIONS="--max-old-space-size=3584"
|
export NODE_OPTIONS="--max-old-space-size=3584"
|
||||||
$STD yarn install --frozen-lockfile
|
$STD yarn install --frozen-lockfile
|
||||||
|
@ -47,7 +47,7 @@ function update_script() {
|
|||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Updating ${APP} to ${RELEASE}"
|
msg_info "Updating ${APP} to ${RELEASE}"
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
cd /opt/paymenter || exit
|
cd /opt/paymenter
|
||||||
$STD php artisan p:upgrade --no-interaction
|
$STD php artisan p:upgrade --no-interaction
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
else
|
else
|
||||||
|
@ -27,7 +27,7 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||||
|
|
||||||
if [[ "$CURRENT_PHP" != "8.4" ]]; then
|
if [[ "$CURRENT_PHP" != "8.4" ]]; then
|
||||||
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
|
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
|
||||||
@ -47,7 +47,7 @@ function update_script() {
|
|||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
cd /opt/pelican-panel || exit
|
cd /opt/pelican-panel
|
||||||
$STD php artisan down
|
$STD php artisan down
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ function update_script() {
|
|||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
cd /opt/pterodactyl-panel || exit
|
cd /opt/pterodactyl-panel
|
||||||
$STD php artisan down
|
$STD php artisan down
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ function update_script() {
|
|||||||
cp /opt/snipe-it-backup/.env /opt/snipe-it/.env
|
cp /opt/snipe-it-backup/.env /opt/snipe-it/.env
|
||||||
cp -r /opt/snipe-it-backup/public/uploads/ /opt/snipe-it/public/uploads/
|
cp -r /opt/snipe-it-backup/public/uploads/ /opt/snipe-it/public/uploads/
|
||||||
cp -r /opt/snipe-it-backup/storage/private_uploads /opt/snipe-it/storage/private_uploads
|
cp -r /opt/snipe-it-backup/storage/private_uploads /opt/snipe-it/storage/private_uploads
|
||||||
cd /opt/snipe-it/ || exit
|
cd /opt/snipe-it/
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
$STD composer dump-autoload
|
$STD composer dump-autoload
|
||||||
|
@ -36,15 +36,15 @@ function update_script() {
|
|||||||
else
|
else
|
||||||
msg_info "Updating ${APP} (Patience)"
|
msg_info "Updating ${APP} (Patience)"
|
||||||
export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
|
export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
|
||||||
cd /opt/tandoor/ || exit
|
cd /opt/tandoor/
|
||||||
$STD pip3 install -r requirements.txt
|
$STD pip3 install -r requirements.txt
|
||||||
$STD /usr/bin/python3 /opt/tandoor/manage.py migrate
|
$STD /usr/bin/python3 /opt/tandoor/manage.py migrate
|
||||||
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input
|
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input
|
||||||
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse
|
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse
|
||||||
cd /opt/tandoor/vue || exit
|
cd /opt/tandoor/vue
|
||||||
$STD yarn install
|
$STD yarn install
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
cd /opt/tandoor || exit
|
cd /opt/tandoor
|
||||||
$STD python3 version.py
|
$STD python3 version.py
|
||||||
systemctl restart gunicorn_tandoor
|
systemctl restart gunicorn_tandoor
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated ${APP}"
|
||||||
|
@ -38,7 +38,7 @@ function update_script() {
|
|||||||
cp -R /usr/share/zabbix/ /opt/zabbix-backup/
|
cp -R /usr/share/zabbix/ /opt/zabbix-backup/
|
||||||
#cp -R /usr/share/zabbix-* /opt/zabbix-backup/ Remove temporary
|
#cp -R /usr/share/zabbix-* /opt/zabbix-backup/ Remove temporary
|
||||||
rm -Rf /etc/apt/sources.list.d/zabbix.list
|
rm -Rf /etc/apt/sources.list.d/zabbix.list
|
||||||
cd /tmp || exit
|
cd /tmp
|
||||||
curl -fsSL "$(curl -fsSL https://repo.zabbix.com/zabbix/ |
|
curl -fsSL "$(curl -fsSL https://repo.zabbix.com/zabbix/ |
|
||||||
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1 |
|
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1 |
|
||||||
xargs -I{} echo "https://repo.zabbix.com/zabbix/{}/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb")" \
|
xargs -I{} echo "https://repo.zabbix.com/zabbix/{}/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb")" \
|
||||||
|
@ -34,7 +34,7 @@ function update_script() {
|
|||||||
msg_ok "Stopped $APP"
|
msg_ok "Stopped $APP"
|
||||||
|
|
||||||
msg_info "Updating $APP to ${RELEASE}"
|
msg_info "Updating $APP to ${RELEASE}"
|
||||||
cd /tmp || exit
|
cd /tmp
|
||||||
curl -fsSL "https://github.com/zitadel/zitadel/releases/download/v$RELEASE/zitadel-linux-amd64.tar.gz" | tar -xz
|
curl -fsSL "https://github.com/zitadel/zitadel/releases/download/v$RELEASE/zitadel-linux-amd64.tar.gz" | tar -xz
|
||||||
mv zitadel-linux-amd64/zitadel /usr/local/bin
|
mv zitadel-linux-amd64/zitadel /usr/local/bin
|
||||||
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
|
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
|
||||||
|
@ -61,7 +61,7 @@ if [[ "$INSTALL_WGD" =~ ^[Yy]$ ]]; then
|
|||||||
msg_ok "Installed additional dependencies for WGDashboard"
|
msg_ok "Installed additional dependencies for WGDashboard"
|
||||||
msg_info "Installing WGDashboard"
|
msg_info "Installing WGDashboard"
|
||||||
git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard
|
git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard
|
||||||
cd /etc/wgdashboard/src || exit
|
cd /etc/wgdashboard/src
|
||||||
chmod u+x wgd.sh
|
chmod u+x wgd.sh
|
||||||
$STD ./wgd.sh install
|
$STD ./wgd.sh install
|
||||||
msg_ok "Installed WGDashboard"
|
msg_ok "Installed WGDashboard"
|
||||||
@ -79,7 +79,7 @@ depend() {
|
|||||||
|
|
||||||
start() {
|
start() {
|
||||||
ebegin "Starting WGDashboard"
|
ebegin "Starting WGDashboard"
|
||||||
cd /etc/wgdashboard/src/ || exit 1
|
cd /etc/wgdashboard/src/
|
||||||
./wgd.sh start &
|
./wgd.sh start &
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ tar xzf "${RELEASE}".tar.gz
|
|||||||
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
rm -rf "${RELEASE}".tar.gz
|
rm -rf "${RELEASE}".tar.gz
|
||||||
mv Heimdall-"${VER}" /opt/Heimdall
|
mv Heimdall-"${VER}" /opt/Heimdall
|
||||||
cd /opt/Heimdall || exit
|
cd /opt/Heimdall
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
$STD php artisan key:generate
|
$STD php artisan key:generate
|
||||||
msg_ok "Installed Heimdall Dashboard ${RELEASE}"
|
msg_ok "Installed Heimdall Dashboard ${RELEASE}"
|
||||||
|
@ -34,7 +34,7 @@ chmod +x /usr/bin/yt-dlp
|
|||||||
msg_ok "Installed Additional Tools"
|
msg_ok "Installed Additional Tools"
|
||||||
|
|
||||||
msg_info "Installing Meilisearch"
|
msg_info "Installing Meilisearch"
|
||||||
cd /tmp || exit
|
cd /tmp
|
||||||
curl -fsSL "https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb" -o "meilisearch.deb"
|
curl -fsSL "https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb" -o "meilisearch.deb"
|
||||||
$STD dpkg -i meilisearch.deb
|
$STD dpkg -i meilisearch.deb
|
||||||
curl -fsSL "https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml" -o "/etc/meilisearch.toml"
|
curl -fsSL "https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml" -o "/etc/meilisearch.toml"
|
||||||
@ -59,21 +59,21 @@ $STD npm install -g corepack@0.31.0
|
|||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Installing karakeep"
|
msg_info "Installing karakeep"
|
||||||
cd /opt || exit
|
cd /opt
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||||
unzip -q "v${RELEASE}.zip"
|
unzip -q "v${RELEASE}.zip"
|
||||||
mv karakeep-"${RELEASE}" /opt/karakeep
|
mv karakeep-"${RELEASE}" /opt/karakeep
|
||||||
cd /opt/karakeep || exit
|
cd /opt/karakeep
|
||||||
corepack enable
|
corepack enable
|
||||||
export PUPPETEER_SKIP_DOWNLOAD="true"
|
export PUPPETEER_SKIP_DOWNLOAD="true"
|
||||||
export NEXT_TELEMETRY_DISABLED=1
|
export NEXT_TELEMETRY_DISABLED=1
|
||||||
export CI="true"
|
export CI="true"
|
||||||
cd /opt/karakeep/apps/web || exit
|
cd /opt/karakeep/apps/web
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
$STD pnpm exec next build --experimental-build-mode compile
|
$STD pnpm exec next build --experimental-build-mode compile
|
||||||
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
||||||
cd /opt/karakeep/apps/workers || exit
|
cd /opt/karakeep/apps/workers
|
||||||
$STD pnpm install --frozen-lockfile
|
$STD pnpm install --frozen-lockfile
|
||||||
|
|
||||||
export DATA_DIR=/opt/karakeep_data
|
export DATA_DIR=/opt/karakeep_data
|
||||||
@ -103,7 +103,7 @@ msg_ok "Installed karakeep"
|
|||||||
|
|
||||||
msg_info "Running Database Migration"
|
msg_info "Running Database Migration"
|
||||||
mkdir -p ${DATA_DIR}
|
mkdir -p ${DATA_DIR}
|
||||||
cd /opt/karakeep/packages/db || exit
|
cd /opt/karakeep/packages/db
|
||||||
$STD pnpm migrate
|
$STD pnpm migrate
|
||||||
msg_ok "Database Migration Completed"
|
msg_ok "Database Migration Completed"
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/kimai/kimai/releases/latest |
|
|||||||
curl -fsSL "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip")
|
curl -fsSL "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip")
|
||||||
unzip -q "${RELEASE}".zip
|
unzip -q "${RELEASE}".zip
|
||||||
mv kimai-"${RELEASE}" /opt/kimai
|
mv kimai-"${RELEASE}" /opt/kimai
|
||||||
cd /opt/kimai || exit
|
cd /opt/kimai
|
||||||
echo "export COMPOSER_ALLOW_SUPERUSER=1" >>~/.bashrc
|
echo "export COMPOSER_ALLOW_SUPERUSER=1" >>~/.bashrc
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
|
@ -58,10 +58,10 @@ $STD apt-get install -y \
|
|||||||
tesseract-ocr \
|
tesseract-ocr \
|
||||||
tesseract-ocr-eng
|
tesseract-ocr-eng
|
||||||
|
|
||||||
cd /tmp || exit
|
cd /tmp
|
||||||
curl -fsSL "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz" -o $(basename "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz")
|
curl -fsSL "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz" -o $(basename "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz")
|
||||||
$STD tar -xzf ghostscript-10.04.0.tar.gz
|
$STD tar -xzf ghostscript-10.04.0.tar.gz
|
||||||
cd ghostscript-10.04.0 || exit
|
cd ghostscript-10.04.0
|
||||||
$STD ./configure
|
$STD ./configure
|
||||||
$STD make
|
$STD make
|
||||||
$STD sudo make install
|
$STD sudo make install
|
||||||
@ -69,7 +69,7 @@ msg_ok "Installed OCR Dependencies"
|
|||||||
|
|
||||||
msg_info "Installing JBIG2"
|
msg_info "Installing JBIG2"
|
||||||
$STD git clone https://github.com/ie13/jbig2enc /opt/jbig2enc
|
$STD git clone https://github.com/ie13/jbig2enc /opt/jbig2enc
|
||||||
cd /opt/jbig2enc || exit
|
cd /opt/jbig2enc
|
||||||
$STD bash ./autogen.sh
|
$STD bash ./autogen.sh
|
||||||
$STD bash ./configure
|
$STD bash ./configure
|
||||||
$STD make
|
$STD make
|
||||||
@ -79,12 +79,12 @@ msg_ok "Installed JBIG2"
|
|||||||
|
|
||||||
msg_info "Installing Paperless-ngx (Patience)"
|
msg_info "Installing Paperless-ngx (Patience)"
|
||||||
Paperlessngx=$(curl -fsSL "https://github.com/paperless-ngx/paperless-ngx/releases/latest" | grep "title>Release" | cut -d " " -f 5)
|
Paperlessngx=$(curl -fsSL "https://github.com/paperless-ngx/paperless-ngx/releases/latest" | grep "title>Release" | cut -d " " -f 5)
|
||||||
cd /opt || exit
|
cd /opt
|
||||||
$STD curl -fsSL "https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz" -o "paperless-ngx-$Paperlessngx.tar.xz"
|
$STD curl -fsSL "https://github.com/paperless-ngx/paperless-ngx/releases/download/$Paperlessngx/paperless-ngx-$Paperlessngx.tar.xz" -o "paperless-ngx-$Paperlessngx.tar.xz"
|
||||||
$STD tar -xf "paperless-ngx-$Paperlessngx.tar.xz" -C /opt/
|
$STD tar -xf "paperless-ngx-$Paperlessngx.tar.xz" -C /opt/
|
||||||
mv paperless-ngx paperless
|
mv paperless-ngx paperless
|
||||||
rm "paperless-ngx-$Paperlessngx.tar.xz"
|
rm "paperless-ngx-$Paperlessngx.tar.xz"
|
||||||
cd /opt/paperless || exit
|
cd /opt/paperless
|
||||||
$STD pip install --upgrade pip
|
$STD pip install --upgrade pip
|
||||||
$STD pip install -r requirements.txt
|
$STD pip install -r requirements.txt
|
||||||
curl -fsSL "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/paperless.conf.example" -o /opt/paperless/paperless.conf
|
curl -fsSL "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/paperless.conf.example" -o /opt/paperless/paperless.conf
|
||||||
@ -121,7 +121,7 @@ sed -i -e "s|#PAPERLESS_DBNAME=paperless|PAPERLESS_DBNAME=$DB_NAME|" /opt/paperl
|
|||||||
sed -i -e "s|#PAPERLESS_DBUSER=paperless|PAPERLESS_DBUSER=$DB_USER|" /opt/paperless/paperless.conf
|
sed -i -e "s|#PAPERLESS_DBUSER=paperless|PAPERLESS_DBUSER=$DB_USER|" /opt/paperless/paperless.conf
|
||||||
sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf
|
sed -i -e "s|#PAPERLESS_DBPASS=paperless|PAPERLESS_DBPASS=$DB_PASS|" /opt/paperless/paperless.conf
|
||||||
sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf
|
sed -i -e "s|#PAPERLESS_SECRET_KEY=change-me|PAPERLESS_SECRET_KEY=$SECRET_KEY|" /opt/paperless/paperless.conf
|
||||||
cd /opt/paperless/src || exit
|
cd /opt/paperless/src
|
||||||
$STD python3 manage.py migrate
|
$STD python3 manage.py migrate
|
||||||
msg_ok "Set up PostgreSQL database"
|
msg_ok "Set up PostgreSQL database"
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ msg_info "Installing Paymenter"
|
|||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
||||||
mkdir -p /opt/paymenter
|
mkdir -p /opt/paymenter
|
||||||
cd /opt/paymenter || exit
|
cd /opt/paymenter
|
||||||
curl -fsSL "https://github.com/paymenter/paymenter/releases/download/${RELEASE}/paymenter.tar.gz" -o paymenter.tar.gz
|
curl -fsSL "https://github.com/paymenter/paymenter/releases/download/${RELEASE}/paymenter.tar.gz" -o paymenter.tar.gz
|
||||||
$STD tar -xzvf paymenter.tar.gz
|
$STD tar -xzvf paymenter.tar.gz
|
||||||
chmod -R 755 storage/* bootstrap/cache/
|
chmod -R 755 storage/* bootstrap/cache/
|
||||||
|
@ -55,7 +55,7 @@ msg_ok "Set up MariaDB"
|
|||||||
msg_info "Installing Pelican Panel"
|
msg_info "Installing Pelican Panel"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
mkdir /opt/pelican-panel
|
mkdir /opt/pelican-panel
|
||||||
cd /opt/pelican-panel || exit
|
cd /opt/pelican-panel
|
||||||
curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz")
|
curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz")
|
||||||
tar -xzf "panel.tar.gz"
|
tar -xzf "panel.tar.gz"
|
||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
|
@ -21,7 +21,7 @@ msg_info "Installing Prowlarr"
|
|||||||
temp_file="$(mktemp)"
|
temp_file="$(mktemp)"
|
||||||
mkdir -p /var/lib/prowlarr/
|
mkdir -p /var/lib/prowlarr/
|
||||||
chmod 775 /var/lib/prowlarr/
|
chmod 775 /var/lib/prowlarr/
|
||||||
cd /var/lib/prowlarr/ || exit
|
cd /var/lib/prowlarr/
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
curl -fsSL "https://github.com/Prowlarr/Prowlarr/releases/download/v${RELEASE}/Prowlarr.master.${RELEASE}.linux-core-x64.tar.gz" -o "$temp_file"
|
curl -fsSL "https://github.com/Prowlarr/Prowlarr/releases/download/v${RELEASE}/Prowlarr.master.${RELEASE}.linux-core-x64.tar.gz" -o "$temp_file"
|
||||||
$STD tar -xvzf "$temp_file"
|
$STD tar -xvzf "$temp_file"
|
||||||
|
@ -60,7 +60,7 @@ read -p "Enter your Last Name: " NAME_LAST
|
|||||||
msg_info "Installing pterodactyl Panel"
|
msg_info "Installing pterodactyl Panel"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
mkdir /opt/pterodactyl-panel
|
mkdir /opt/pterodactyl-panel
|
||||||
cd /opt/pterodactyl-panel || exit
|
cd /opt/pterodactyl-panel
|
||||||
curl -fsSL "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz")
|
curl -fsSL "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz")
|
||||||
tar -xzf "panel.tar.gz"
|
tar -xzf "panel.tar.gz"
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
@ -21,7 +21,7 @@ msg_info "Installing Radarr"
|
|||||||
temp_file="$(mktemp)"
|
temp_file="$(mktemp)"
|
||||||
mkdir -p /var/lib/radarr/
|
mkdir -p /var/lib/radarr/
|
||||||
chmod 775 /var/lib/radarr/
|
chmod 775 /var/lib/radarr/
|
||||||
cd /var/lib/radarr/ || exit
|
cd /var/lib/radarr/
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Radarr/Radarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/Radarr/Radarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
curl -fsSL "https://github.com/Radarr/Radarr/releases/download/v${RELEASE}/Radarr.master.${RELEASE}.linux-core-x64.tar.gz" -o "$temp_file"
|
curl -fsSL "https://github.com/Radarr/Radarr/releases/download/v${RELEASE}/Radarr.master.${RELEASE}.linux-core-x64.tar.gz" -o "$temp_file"
|
||||||
$STD tar -xvzf "$temp_file"
|
$STD tar -xvzf "$temp_file"
|
||||||
|
@ -14,7 +14,7 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Zabbix"
|
msg_info "Installing Zabbix"
|
||||||
cd /tmp || exit
|
cd /tmp
|
||||||
curl -fsSL "$(curl -fsSL https://repo.zabbix.com/zabbix/ |
|
curl -fsSL "$(curl -fsSL https://repo.zabbix.com/zabbix/ |
|
||||||
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1 |
|
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1 |
|
||||||
xargs -I{} echo "https://repo.zabbix.com/zabbix/{}/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb")" \
|
xargs -I{} echo "https://repo.zabbix.com/zabbix/{}/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb")" \
|
||||||
|
@ -1333,7 +1333,7 @@ build_container() {
|
|||||||
$PW
|
$PW
|
||||||
"
|
"
|
||||||
# This executes create_lxc.sh and creates the container and .conf file
|
# This executes create_lxc.sh and creates the container and .conf file
|
||||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh)" || exit $?
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh)" $?
|
||||||
|
|
||||||
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
||||||
if [ "$CT_TYPE" == "0" ]; then
|
if [ "$CT_TYPE" == "0" ]; then
|
||||||
@ -1395,7 +1395,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
|||||||
EOF'
|
EOF'
|
||||||
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
||||||
fi
|
fi
|
||||||
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" || exit $?
|
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" $?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ while [ -z "${CTID:+x}" ]; do
|
|||||||
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
||||||
"\nSelect a container to add NetBird to:\n" \
|
"\nSelect a container to add NetBird to:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
|
|
||||||
LXC_STATUS=$(pct status "$CTID" | awk '{print $2}')
|
LXC_STATUS=$(pct status "$CTID" | awk '{print $2}')
|
||||||
@ -84,7 +84,7 @@ curl -fsSL "https://pkgs.netbird.io/debian/public.key" | gpg --dearmor >/usr/sha
|
|||||||
echo "deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main" >/etc/apt/sources.list.d/netbird.list
|
echo "deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main" >/etc/apt/sources.list.d/netbird.list
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
apt-get install -y netbird-ui &>/dev/null
|
apt-get install -y netbird-ui &>/dev/null
|
||||||
' || exit
|
'
|
||||||
msg "\e[1;32m ✔ Installed NetBird.\e[0m"
|
msg "\e[1;32m ✔ Installed NetBird.\e[0m"
|
||||||
sleep 2
|
sleep 2
|
||||||
msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run netbird up in the LXC console\e[0m"
|
msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run netbird up in the LXC console\e[0m"
|
||||||
|
@ -49,7 +49,7 @@ while [ -z "${CTID:+x}" ]; do
|
|||||||
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
||||||
"\nSelect a container to add Tailscale to:\n" \
|
"\nSelect a container to add Tailscale to:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
|
|
||||||
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
|
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
|
||||||
@ -66,7 +66,7 @@ curl -fsSL https://pkgs.tailscale.com/stable/$ID/$VER.noarmor.gpg | tee /usr/sha
|
|||||||
echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/$ID $VER main" >/etc/apt/sources.list.d/tailscale.list
|
echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/$ID $VER main" >/etc/apt/sources.list.d/tailscale.list
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
apt-get install -y tailscale &>/dev/null
|
apt-get install -y tailscale &>/dev/null
|
||||||
' || exit
|
'
|
||||||
TAGS=$(awk -F': ' '/^tags:/ {print $2}' /etc/pve/lxc/${CTID}.conf)
|
TAGS=$(awk -F': ' '/^tags:/ {print $2}' /etc/pve/lxc/${CTID}.conf)
|
||||||
TAGS="${TAGS:+$TAGS; }tailscale"
|
TAGS="${TAGS:+$TAGS; }tailscale"
|
||||||
pct set "$CTID" -tags "${TAGS}"
|
pct set "$CTID" -tags "${TAGS}"
|
||||||
|
@ -58,7 +58,7 @@ fi
|
|||||||
header_info
|
header_info
|
||||||
echo "Loading..."
|
echo "Loading..."
|
||||||
pveam update >/dev/null 2>&1
|
pveam update >/dev/null 2>&1
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Templates" --yesno "This will allow for the creation of one of the many Template LXC Containers. Proceed?" 10 68
|
||||||
TEMPLATE_MENU=()
|
TEMPLATE_MENU=()
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
while read -r TAG ITEM; do
|
while read -r TAG ITEM; do
|
||||||
@ -66,7 +66,7 @@ while read -r TAG ITEM; do
|
|||||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||||
TEMPLATE_MENU+=("$ITEM" "$TAG " "OFF")
|
TEMPLATE_MENU+=("$ITEM" "$TAG " "OFF")
|
||||||
done < <(pveam available)
|
done < <(pveam available)
|
||||||
TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${TEMPLATE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
TEMPLATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "All Template LXCs" --radiolist "\nSelect a Template LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 10 "${TEMPLATE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
[ -z "$TEMPLATE" ] && {
|
[ -z "$TEMPLATE" ] && {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Template LXC Selected" --msgbox "It appears that no Template LXC container was selected" 10 68
|
||||||
msg "Done"
|
msg "Done"
|
||||||
@ -142,11 +142,11 @@ function select_storage() {
|
|||||||
}
|
}
|
||||||
header_info
|
header_info
|
||||||
# Get template storage
|
# Get template storage
|
||||||
TEMPLATE_STORAGE=$(select_storage template) || exit
|
TEMPLATE_STORAGE=$(select_storage template)
|
||||||
info "Using '$TEMPLATE_STORAGE' for template storage."
|
info "Using '$TEMPLATE_STORAGE' for template storage."
|
||||||
|
|
||||||
# Get container storage
|
# Get container storage
|
||||||
CONTAINER_STORAGE=$(select_storage container) || exit
|
CONTAINER_STORAGE=$(select_storage container)
|
||||||
info "Using '$CONTAINER_STORAGE' for container storage."
|
info "Using '$CONTAINER_STORAGE' for container storage."
|
||||||
|
|
||||||
# Download template
|
# Download template
|
||||||
|
@ -38,7 +38,7 @@ msg_ok() {
|
|||||||
|
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Webmin Installer" --yesno "This Will Install Webmin on this LXC Container. Proceed?" 10 58 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Webmin Installer" --yesno "This Will Install Webmin on this LXC Container. Proceed?" 10 58
|
||||||
|
|
||||||
msg_info "Installing Prerequisites"
|
msg_info "Installing Prerequisites"
|
||||||
apt update &>/dev/null
|
apt update &>/dev/null
|
||||||
|
@ -74,13 +74,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy FROM?\n" \
|
"\nWhich HA LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy TO?\n" \
|
"\nWhich HA LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -91,7 +91,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.01.23" 13 50 || exit
|
Version: 2022.01.23" 13 50
|
||||||
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status "$CTID_TO" | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status "$CTID_TO" | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -72,13 +72,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Container LXC would you like to copy FROM?\n" \
|
"\nWhich HA Container LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -89,7 +89,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.10.02" 13 50 || exit
|
Version: 2022.10.02" 13 50
|
||||||
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -74,13 +74,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy FROM?\n" \
|
"\nWhich HA LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Podman LXC would you like to copy TO?\n" \
|
"\nWhich HA Podman LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -91,7 +91,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.02.12" 13 50 || exit
|
Version: 2022.02.12" 13 50
|
||||||
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -72,13 +72,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Container LXC would you like to copy TO?\n" \
|
"\nWhich HA Container LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -89,7 +89,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.10.02" 13 50 || exit
|
Version: 2022.10.02" 13 50
|
||||||
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -67,13 +67,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
"\nWhich HA Core LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
"\nWhich HA Core LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -84,7 +84,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.10.03" 13 50 || exit
|
Version: 2022.10.03" 13 50
|
||||||
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_FROM | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status $CTID_FROM | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_FROM'..."
|
msg "Stopping '$CTID_FROM'..."
|
||||||
|
@ -74,13 +74,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Plex Media Server LXC would you like to copy FROM?\n" \
|
"\nWhich Plex Media Server LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Plex Media Server LXC would you like to copy TO?\n" \
|
"\nWhich Plex Media Server LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -91,7 +91,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.01.24" 13 50 || exit
|
Version: 2022.01.24" 13 50
|
||||||
info "Plex Media Server Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Plex Media Server Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -74,13 +74,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA Podman LXC would you like to copy FROM?\n" \
|
"\nWhich HA Podman LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich HA LXC would you like to copy TO?\n" \
|
"\nWhich HA LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -91,7 +91,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.03.31" 13 50 || exit
|
Version: 2022.03.31" 13 50
|
||||||
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Home Assistant Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -74,13 +74,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Zigbee2MQTT LXC would you like to copy FROM?\n" \
|
"\nWhich Zigbee2MQTT LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Zigbee2MQTT LXC would you like to copy TO?\n" \
|
"\nWhich Zigbee2MQTT LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -91,7 +91,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.01.23" 13 50 || exit
|
Version: 2022.01.23" 13 50
|
||||||
info "Zigbee2MQTT Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Zigbee2MQTT Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -75,13 +75,13 @@ while [ -z "${CTID_FROM:+x}" ]; do
|
|||||||
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_FROM=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Zwavejs2MQTT LXC would you like to copy FROM?\n" \
|
"\nWhich Zwavejs2MQTT LXC would you like to copy FROM?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
while [ -z "${CTID_TO:+x}" ]; do
|
while [ -z "${CTID_TO:+x}" ]; do
|
||||||
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
CTID_TO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "$TITLE" --radiolist \
|
||||||
"\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \
|
"\nWhich Z-wave JS UI LXC would you like to copy TO?\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
@ -92,7 +92,7 @@ done
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.09.21" 13 50 || exit
|
Version: 2022.09.21" 13 50
|
||||||
info "Zwavejs2MQTT Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Zwavejs2MQTT Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status "$CTID_TO" | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status "$CTID_TO" | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
|
@ -23,7 +23,7 @@ GN=$(echo "\033[1;92m")
|
|||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
header_info
|
header_info
|
||||||
echo "Loading..."
|
echo "Loading..."
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed?" 10 58 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Clean logs, cache and update apt lists on selected LXC Containers. Proceed?" 10 58
|
||||||
NODE=$(hostname)
|
NODE=$(hostname)
|
||||||
EXCLUDE_MENU=()
|
EXCLUDE_MENU=()
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
@ -33,7 +33,7 @@ while read -r TAG ITEM; do
|
|||||||
EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
|
EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
|
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
|
||||||
16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
|
|
||||||
function clean_container() {
|
function clean_container() {
|
||||||
container=$1
|
container=$1
|
||||||
|
@ -74,7 +74,7 @@ while [ -z "${CTID:+x}" ]; do
|
|||||||
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
CTID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --radiolist \
|
||||||
"\nSelect a container to add support:\n" \
|
"\nSelect a container to add support:\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add autodev settings
|
# Add autodev settings
|
||||||
|
@ -34,7 +34,7 @@ if [ "$ROOT_FS" != "ext4" ]; then
|
|||||||
fi
|
fi
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" \
|
whiptail --backtitle "Proxmox VE Helper Scripts" \
|
||||||
--title "Proxmox VE LXC Filesystem Trim" \
|
--title "Proxmox VE LXC Filesystem Trim" \
|
||||||
--yesno "The LXC containers will undergo the fstrim command. Proceed?" 10 58 || exit
|
--yesno "The LXC containers will undergo the fstrim command. Proceed?" 10 58
|
||||||
|
|
||||||
NODE=$(hostname)
|
NODE=$(hostname)
|
||||||
EXCLUDE_MENU=()
|
EXCLUDE_MENU=()
|
||||||
|
@ -49,7 +49,7 @@ if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Add Intel HW Acceleration" --yesno "This Will Add Intel HW Acceleration to an existing LXC Container. Proceed?" 8 72
|
||||||
NODE=$(hostname)
|
NODE=$(hostname)
|
||||||
PREV_MENU=()
|
PREV_MENU=()
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
@ -66,7 +66,7 @@ while read -r TAG ITEM; do
|
|||||||
PREV_MENU+=("$TAG" "$ITEM " "OFF")
|
PREV_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(echo "$privileged_containers")
|
done < <(echo "$privileged_containers")
|
||||||
|
|
||||||
privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add Intel HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
privileged_container=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Privileged Containers on $NODE" --checklist "\nSelect a Container To Add Intel HW Acceleration:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${PREV_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
header_info
|
header_info
|
||||||
read -r -p "Verbose mode? <y/N> " prompt
|
read -r -p "Verbose mode? <y/N> " prompt
|
||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
|
@ -37,7 +37,7 @@ function msg_ok() {
|
|||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Pin" --yesno "This will Pin/Unpin Kernel Images, Proceed?" 10 68 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Pin" --yesno "This will Pin/Unpin Kernel Images, Proceed?" 10 68
|
||||||
|
|
||||||
KERNEL_MENU=()
|
KERNEL_MENU=()
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
@ -47,7 +47,7 @@ while read -r TAG ITEM; do
|
|||||||
KERNEL_MENU+=("$TAG" "$ITEM " "OFF")
|
KERNEL_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(echo "$available_kernels")
|
done < <(echo "$available_kernels")
|
||||||
|
|
||||||
pin_kernel=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --radiolist "\nSelect Kernel to pin:\nCancel to Unpin any Kernel" 16 $((MSG_MAX_LENGTH + 58)) 6 "${KERNEL_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
pin_kernel=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Kernel $current_kernel" --radiolist "\nSelect Kernel to pin:\nCancel to Unpin any Kernel" 16 $((MSG_MAX_LENGTH + 58)) 6 "${KERNEL_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
[ -z "$pin_kernel" ] && {
|
[ -z "$pin_kernel" ] && {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Kernel Selected" --msgbox "It appears that no Kernel was selected\nUnpinning any pinned Kernel" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Kernel Selected" --msgbox "It appears that no Kernel was selected\nUnpinning any pinned Kernel" 10 68
|
||||||
msg_info "Unpinning any Kernel"
|
msg_info "Unpinning any Kernel"
|
||||||
@ -59,7 +59,7 @@ pin_kernel=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current K
|
|||||||
echo -e "${RD} REBOOT${CL}"
|
echo -e "${RD} REBOOT${CL}"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Pin" --yesno "Would you like to pin the $pin_kernel Kernel?" 10 68 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Kernel Pin" --yesno "Would you like to pin the $pin_kernel Kernel?" 10 68
|
||||||
|
|
||||||
msg_info "Pinning $pin_kernel"
|
msg_info "Pinning $pin_kernel"
|
||||||
proxmox-boot-tool kernel pin $pin_kernel &>/dev/null
|
proxmox-boot-tool kernel pin $pin_kernel &>/dev/null
|
||||||
|
@ -40,7 +40,7 @@ CM="${TAB}✔️${TAB}${CL}"
|
|||||||
|
|
||||||
header_info
|
header_info
|
||||||
echo "Loading..."
|
echo "Loading..."
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Deletion" --yesno "This will delete LXC containers. Proceed?" 10 58 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Deletion" --yesno "This will delete LXC containers. Proceed?" 10 58
|
||||||
|
|
||||||
NODE=$(hostname)
|
NODE=$(hostname)
|
||||||
containers=$(pct list | tail -n +2 | awk '{print $0 " " $4}')
|
containers=$(pct list | tail -n +2 | awk '{print $0 " " $4}')
|
||||||
|
@ -61,7 +61,7 @@ intel() {
|
|||||||
MICROCODE_MENU+=("$TAG" "$ITEM " "OFF")
|
MICROCODE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(echo "$intel_microcode")
|
done < <(echo "$intel_microcode")
|
||||||
|
|
||||||
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
|
|
||||||
[ -z "$microcode" ] && {
|
[ -z "$microcode" ] && {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68
|
||||||
@ -105,7 +105,7 @@ amd() {
|
|||||||
MICROCODE_MENU+=("$TAG" "$ITEM " "OFF")
|
MICROCODE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(echo "$amd_microcode")
|
done < <(echo "$amd_microcode")
|
||||||
|
|
||||||
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
microcode=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current Microcode revision:${current_microcode}" --radiolist "\nSelect a microcode package to install:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
|
|
||||||
[ -z "$microcode" ] && {
|
[ -z "$microcode" ] && {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No Microcode Selected" --msgbox "It appears that no microcode packages were selected" 10 68
|
||||||
@ -135,7 +135,7 @@ if ! command -v pveversion >/dev/null 2>&1; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Processor Microcode" --yesno "This will check for CPU microcode packages with the option to install. Proceed?" 10 58 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE Processor Microcode" --yesno "This will check for CPU microcode packages with the option to install. Proceed?" 10 58
|
||||||
|
|
||||||
msg_info "Checking CPU Vendor"
|
msg_info "Checking CPU Vendor"
|
||||||
cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+' | head -n 1)
|
cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+' | head -n 1)
|
||||||
|
@ -78,7 +78,7 @@ intel() {
|
|||||||
microcode=$(whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
microcode=$(whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
||||||
--title "Current Microcode Revision: ${current_microcode}" \
|
--title "Current Microcode Revision: ${current_microcode}" \
|
||||||
--radiolist "\nSelect a microcode package to install:\n" \
|
--radiolist "\nSelect a microcode package to install:\n" \
|
||||||
16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
|
|
||||||
[ -z "$microcode" ] && {
|
[ -z "$microcode" ] && {
|
||||||
whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Selected" --msgbox "No microcode package was selected." 10 68
|
whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Selected" --msgbox "No microcode package was selected." 10 68
|
||||||
@ -125,7 +125,7 @@ amd() {
|
|||||||
microcode=$(whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
microcode=$(whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
||||||
--title "Current Microcode Revision: ${current_microcode}" \
|
--title "Current Microcode Revision: ${current_microcode}" \
|
||||||
--radiolist "\nSelect a microcode package to install:\n" \
|
--radiolist "\nSelect a microcode package to install:\n" \
|
||||||
16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
|
|
||||||
[ -z "$microcode" ] && {
|
[ -z "$microcode" ] && {
|
||||||
whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Selected" --msgbox "No microcode package was selected." 10 68
|
whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Selected" --msgbox "No microcode package was selected." 10 68
|
||||||
@ -158,7 +158,7 @@ fi
|
|||||||
|
|
||||||
whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
whiptail --backtitle "Proxmox Backup Server Helper Scripts" \
|
||||||
--title "Proxmox Backup Server Processor Microcode" \
|
--title "Proxmox Backup Server Processor Microcode" \
|
||||||
--yesno "This script searches for CPU microcode packages and offers the option to install them.\nProceed?" 10 68 || exit
|
--yesno "This script searches for CPU microcode packages and offers the option to install them.\nProceed?" 10 68
|
||||||
|
|
||||||
msg_info "Checking CPU vendor"
|
msg_info "Checking CPU vendor"
|
||||||
cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+' | head -n 1)
|
cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+' | head -n 1)
|
||||||
|
@ -15,7 +15,7 @@ header_info() {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
header_info
|
header_info
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU Scaling Governors" --yesno "View/Change CPU Scaling Governors. Proceed?" 10 58 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU Scaling Governors" --yesno "View/Change CPU Scaling Governors. Proceed?" 10 58
|
||||||
current_governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
current_governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||||
GOVERNORS_MENU=()
|
GOVERNORS_MENU=()
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
@ -24,7 +24,7 @@ while read -r TAG ITEM; do
|
|||||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||||
GOVERNORS_MENU+=("$TAG" "$ITEM " "OFF")
|
GOVERNORS_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors | tr ' ' '\n' | grep -v "$current_governor")
|
done < <(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors | tr ' ' '\n' | grep -v "$current_governor")
|
||||||
scaling_governor=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current CPU Scaling Governor is set to $current_governor" --checklist "\nSelect the Scaling Governor to use:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${GOVERNORS_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
scaling_governor=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Current CPU Scaling Governor is set to $current_governor" --checklist "\nSelect the Scaling Governor to use:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${GOVERNORS_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
[ -z "$scaling_governor" ] && {
|
[ -z "$scaling_governor" ] && {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No CPU Scaling Governor Selected" --msgbox "It appears that no CPU Scaling Governor was selected" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No CPU Scaling Governor Selected" --msgbox "It appears that no CPU Scaling Governor was selected" 10 68
|
||||||
clear
|
clear
|
||||||
|
@ -26,7 +26,7 @@ GN=$(echo "\033[1;92m")
|
|||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
header_info
|
header_info
|
||||||
echo "Loading..."
|
echo "Loading..."
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Updater" --yesno "This Will Update LXC Containers. Proceed?" 10 58
|
||||||
NODE=$(hostname)
|
NODE=$(hostname)
|
||||||
EXCLUDE_MENU=()
|
EXCLUDE_MENU=()
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
@ -35,7 +35,7 @@ while read -r TAG ITEM; do
|
|||||||
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET
|
||||||
EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
|
EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF")
|
||||||
done < <(pct list | awk 'NR>1')
|
done < <(pct list | awk 'NR>1')
|
||||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from updates:\n" 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
|
|
||||||
function needs_reboot() {
|
function needs_reboot() {
|
||||||
local container=$1
|
local container=$1
|
||||||
|
@ -56,7 +56,7 @@ if systemctl is-active -q ping-instances.service; then
|
|||||||
systemctl stop ping-instances.service
|
systemctl stop ping-instances.service
|
||||||
fi
|
fi
|
||||||
header_info
|
header_info
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --yesno "This will allow for the creation of one of the many TurnKey LXC Containers. Proceed?" 10 68 || exit
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --yesno "This will allow for the creation of one of the many TurnKey LXC Containers. Proceed?" 10 68
|
||||||
TURNKEY_MENU=()
|
TURNKEY_MENU=()
|
||||||
MSG_MAX_LENGTH=0
|
MSG_MAX_LENGTH=0
|
||||||
while read -r TAG ITEM; do
|
while read -r TAG ITEM; do
|
||||||
@ -88,7 +88,7 @@ wordpress Wordpress
|
|||||||
zoneminder ZoneMinder
|
zoneminder ZoneMinder
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --radiolist "\nSelect a TurnKey LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${TURNKEY_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit
|
turnkey=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "TurnKey LXCs" --radiolist "\nSelect a TurnKey LXC to create:\n" 16 $((MSG_MAX_LENGTH + 58)) 6 "${TURNKEY_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||||
[ -z "$turnkey" ] && {
|
[ -z "$turnkey" ] && {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No TurnKey LXC Selected" --msgbox "It appears that no TurnKey LXC container was selected" 10 68
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "No TurnKey LXC Selected" --msgbox "It appears that no TurnKey LXC container was selected" 10 68
|
||||||
msg "Done"
|
msg "Done"
|
||||||
@ -163,11 +163,11 @@ function select_storage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Get template storage
|
# Get template storage
|
||||||
TEMPLATE_STORAGE=$(select_storage template) || exit
|
TEMPLATE_STORAGE=$(select_storage template)
|
||||||
info "Using '$TEMPLATE_STORAGE' for template storage."
|
info "Using '$TEMPLATE_STORAGE' for template storage."
|
||||||
|
|
||||||
# Get container storage
|
# Get container storage
|
||||||
CONTAINER_STORAGE=$(select_storage container) || exit
|
CONTAINER_STORAGE=$(select_storage container)
|
||||||
info "Using '$CONTAINER_STORAGE' for container storage."
|
info "Using '$CONTAINER_STORAGE' for container storage."
|
||||||
|
|
||||||
# Update LXC template list
|
# Update LXC template list
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
||||||
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
@ -94,7 +93,7 @@ pushd $TEMP_DIR >/dev/null
|
|||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Arch Linux VM" --yesno "This will create a New Arch Linux VM. Proceed?" 10 58; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Arch Linux VM" --yesno "This will create a New Arch Linux VM. Proceed?" 10 58; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
@ -123,7 +122,7 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
function pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
||||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
@ -416,7 +415,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -495,11 +494,11 @@ EOF
|
|||||||
)
|
)
|
||||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||||
if [ -n "$DISK_SIZE" ]; then
|
if [ -n "$DISK_SIZE" ]; then
|
||||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||||
else
|
else
|
||||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Created a Arch Linux VM ${CL}${BL}(${HN})"
|
msg_ok "Created a Arch Linux VM ${CL}${BL}(${HN})"
|
||||||
|
@ -93,7 +93,7 @@ pushd $TEMP_DIR >/dev/null
|
|||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
@ -122,7 +122,7 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
function pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
||||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
@ -416,7 +416,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -494,11 +494,11 @@ EOF
|
|||||||
)
|
)
|
||||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||||
if [ -n "$DISK_SIZE" ]; then
|
if [ -n "$DISK_SIZE" ]; then
|
||||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||||
else
|
else
|
||||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})"
|
msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})"
|
||||||
|
@ -102,13 +102,13 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
function pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
||||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function arch_check() {
|
function arch_check() {
|
||||||
@ -379,7 +379,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -421,14 +421,13 @@ msg_ok "Installed libguestfs-tools successfully"
|
|||||||
|
|
||||||
msg_info "Adding Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image"
|
msg_info "Adding Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image"
|
||||||
virt-customize -q -a "${FILE}" --install qemu-guest-agent,apt-transport-https,ca-certificates,curl,gnupg,software-properties-common,lsb-release >/dev/null &&
|
virt-customize -q -a "${FILE}" --install qemu-guest-agent,apt-transport-https,ca-certificates,curl,gnupg,software-properties-common,lsb-release >/dev/null &&
|
||||||
virt-customize -q -a "${FILE}" --run-command "mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg" >/dev/null &&
|
virt-customize -q -a "${FILE}" --run-command "mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg" >/dev/null &&
|
||||||
virt-customize -q -a "${FILE}" --run-command "echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable' > /etc/apt/sources.list.d/docker.list" >/dev/null &&
|
virt-customize -q -a "${FILE}" --run-command "echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable' > /etc/apt/sources.list.d/docker.list" >/dev/null &&
|
||||||
virt-customize -q -a "${FILE}" --run-command "apt-get update -qq && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin" >/dev/null &&
|
virt-customize -q -a "${FILE}" --run-command "apt-get update -qq && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin" >/dev/null &&
|
||||||
virt-customize -q -a "${FILE}" --run-command "systemctl enable docker" >/dev/null &&
|
virt-customize -q -a "${FILE}" --run-command "systemctl enable docker" >/dev/null &&
|
||||||
virt-customize -q -a "${FILE}" --run-command "echo -n > /etc/machine-id" >/dev/null
|
virt-customize -q -a "${FILE}" --run-command "echo -n > /etc/machine-id" >/dev/null
|
||||||
msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image successfully"
|
msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image successfully"
|
||||||
|
|
||||||
|
|
||||||
msg_info "Creating a Docker VM"
|
msg_info "Creating a Docker VM"
|
||||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||||
-name $HN -tags community-script,debian12,docker -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
-name $HN -tags community-script,debian12,docker -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||||
@ -442,7 +441,8 @@ qm set $VMID \
|
|||||||
qm resize $VMID scsi0 8G >/dev/null
|
qm resize $VMID scsi0 8G >/dev/null
|
||||||
qm set $VMID --agent enabled=1 >/dev/null
|
qm set $VMID --agent enabled=1 >/dev/null
|
||||||
|
|
||||||
DESCRIPTION=$(cat <<EOF
|
DESCRIPTION=$(
|
||||||
|
cat <<EOF
|
||||||
<div align='center'>
|
<div align='center'>
|
||||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||||
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
||||||
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
@ -55,7 +54,7 @@ trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
|
|||||||
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
|
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
|
||||||
|
|
||||||
function error_handler() {
|
function error_handler() {
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local exit_code="$?"
|
local exit_code="$?"
|
||||||
local line_number="$1"
|
local line_number="$1"
|
||||||
@ -87,13 +86,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
function spinner() {
|
function spinner() {
|
||||||
local chars="/-\|"
|
local chars="/-\|"
|
||||||
local spin_i=0
|
local spin_i=0
|
||||||
printf "\e[?25l"
|
printf "\e[?25l"
|
||||||
while true; do
|
while true; do
|
||||||
printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}"
|
printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}"
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
@ -104,14 +103,14 @@ function msg_info() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function msg_ok() {
|
function msg_ok() {
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_error() {
|
function msg_error() {
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
||||||
@ -134,7 +133,7 @@ function pve_check() {
|
|||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function arch_check() {
|
function arch_check() {
|
||||||
@ -393,7 +392,6 @@ pve_check
|
|||||||
ssh_check
|
ssh_check
|
||||||
start_script
|
start_script
|
||||||
|
|
||||||
|
|
||||||
post_to_api_vm
|
post_to_api_vm
|
||||||
|
|
||||||
msg_info "Validating Storage"
|
msg_info "Validating Storage"
|
||||||
@ -416,12 +414,12 @@ elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
|||||||
STORAGE=${STORAGE_MENU[0]}
|
STORAGE=${STORAGE_MENU[0]}
|
||||||
else
|
else
|
||||||
while [ -z "${STORAGE:+x}" ]; do
|
while [ -z "${STORAGE:+x}" ]; do
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -485,5 +483,3 @@ if [ "$START_VM" == "yes" ]; then
|
|||||||
fi
|
fi
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
||||||
|
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
__ ____ __ __ _ __ ____ __ ____ _____ ________ ______
|
__ ____ __ __ _ __ ____ __ ____ _____ ________ ______
|
||||||
@ -244,7 +243,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the Mikrotik RouterOS CHR VM?\n\n" \
|
"Which storage pool you would like to use for the Mikrotik RouterOS CHR VM?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
|
@ -110,7 +110,7 @@ function pve_check() {
|
|||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function arch_check() {
|
function arch_check() {
|
||||||
@ -380,7 +380,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
|
@ -176,7 +176,7 @@ function pve_check() {
|
|||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function arch_check() {
|
function arch_check() {
|
||||||
@ -440,7 +440,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the OpenWrt VM?\n\n" \
|
"Which storage pool you would like to use for the OpenWrt VM?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
|
@ -230,8 +230,8 @@ function default_settings() {
|
|||||||
echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}"
|
echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}"
|
echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}"
|
||||||
if ! grep -q "^iface ${BRG}" /etc/network/interfaces; then
|
if ! grep -q "^iface ${BRG}" /etc/network/interfaces; then
|
||||||
msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces"
|
msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Using LAN Bridge: ${BGN}${BRG}${CL}"
|
echo -e "${DGN}Using LAN Bridge: ${BGN}${BRG}${CL}"
|
||||||
fi
|
fi
|
||||||
@ -518,7 +518,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -530,7 +530,7 @@ msg_ok "${CL}${BL}${URL}${CL}"
|
|||||||
curl -f#SL -o "$(basename "$URL")" "$URL"
|
curl -f#SL -o "$(basename "$URL")" "$URL"
|
||||||
echo -en "\e[1A\e[0K"
|
echo -en "\e[1A\e[0K"
|
||||||
FILE=Fressbsd.qcow2
|
FILE=Fressbsd.qcow2
|
||||||
unxz -cv $(basename $URL) > ${FILE}
|
unxz -cv $(basename $URL) >${FILE}
|
||||||
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
|
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
|
||||||
|
|
||||||
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
|
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
|
||||||
@ -564,10 +564,11 @@ qm set $VMID \
|
|||||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||||
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \
|
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \
|
||||||
-boot order=scsi0 \
|
-boot order=scsi0 \
|
||||||
-serial0 socket >/dev/null \
|
-serial0 socket \
|
||||||
-tags community-script
|
-tags community-script >/dev/null
|
||||||
qm resize $VMID scsi0 10G >/dev/null
|
qm resize $VMID scsi0 10G >/dev/null
|
||||||
DESCRIPTION=$(cat <<EOF
|
DESCRIPTION=$(
|
||||||
|
cat <<EOF
|
||||||
<div align='center'>
|
<div align='center'>
|
||||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||||
<img src='https://raw.githubusercontent.com/michelroegl-brunner/ProxmoxVE/refs/heads/develop/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
<img src='https://raw.githubusercontent.com/michelroegl-brunner/ProxmoxVE/refs/heads/develop/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||||
@ -596,7 +597,7 @@ qm resize $VMID scsi0 10G >/dev/null
|
|||||||
</div>
|
</div>
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||||
|
|
||||||
msg_info "Bridge interfaces are being added."
|
msg_info "Bridge interfaces are being added."
|
||||||
qm set $VMID \
|
qm set $VMID \
|
||||||
@ -604,68 +605,68 @@ qm set $VMID \
|
|||||||
msg_ok "Bridge interfaces have been successfully added."
|
msg_ok "Bridge interfaces have been successfully added."
|
||||||
|
|
||||||
msg_ok "Created a OPNsense VM ${CL}${BL}(${HN})"
|
msg_ok "Created a OPNsense VM ${CL}${BL}(${HN})"
|
||||||
msg_ok "Starting OPNsense VM (Patience this takes 20-30 minutes)"
|
msg_ok "Starting OPNsense VM (Patience this takes 20-30 minutes)"
|
||||||
qm start $VMID
|
qm start $VMID
|
||||||
sleep 90
|
sleep 90
|
||||||
send_line_to_vm "root"
|
send_line_to_vm "root"
|
||||||
send_line_to_vm "fetch https://raw.githubusercontent.com/opnsense/update/master/src/bootstrap/opnsense-bootstrap.sh.in"
|
send_line_to_vm "fetch https://raw.githubusercontent.com/opnsense/update/master/src/bootstrap/opnsense-bootstrap.sh.in"
|
||||||
qm set $VMID \
|
qm set $VMID \
|
||||||
-net1 virtio,bridge=${WAN_BRG},macaddr=${WAN_MAC} &>/dev/null
|
-net1 virtio,bridge=${WAN_BRG},macaddr=${WAN_MAC} &>/dev/null
|
||||||
sleep 10
|
sleep 10
|
||||||
send_line_to_vm "sh ./opnsense-bootstrap.sh.in -y -f -r 25.1"
|
send_line_to_vm "sh ./opnsense-bootstrap.sh.in -y -f -r 25.1"
|
||||||
msg_ok "OPNsense VM is being installed, do not close the terminal, or the installation will fail."
|
msg_ok "OPNsense VM is being installed, do not close the terminal, or the installation will fail."
|
||||||
#We need to wait for the OPNsense build proccess to finish, this takes a few minutes
|
#We need to wait for the OPNsense build proccess to finish, this takes a few minutes
|
||||||
sleep 1000
|
sleep 1000
|
||||||
send_line_to_vm "root"
|
send_line_to_vm "root"
|
||||||
send_line_to_vm "opnsense"
|
send_line_to_vm "opnsense"
|
||||||
send_line_to_vm "2"
|
send_line_to_vm "2"
|
||||||
|
|
||||||
if [ "$IP_ADDR" != "" ]; then
|
if [ "$IP_ADDR" != "" ]; then
|
||||||
send_line_to_vm "1"
|
send_line_to_vm "1"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "${IP_ADDR}"
|
send_line_to_vm "${IP_ADDR}"
|
||||||
send_line_to_vm "${NETMASK}"
|
send_line_to_vm "${NETMASK}"
|
||||||
send_line_to_vm "${LAN_GW}"
|
send_line_to_vm "${LAN_GW}"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm " "
|
send_line_to_vm " "
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm " "
|
send_line_to_vm " "
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
else
|
else
|
||||||
send_line_to_vm "1"
|
send_line_to_vm "1"
|
||||||
send_line_to_vm "y"
|
send_line_to_vm "y"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm " "
|
send_line_to_vm " "
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
fi
|
fi
|
||||||
#we need to wait for the Config changes to be saved
|
#we need to wait for the Config changes to be saved
|
||||||
sleep 20
|
sleep 20
|
||||||
if [ "$WAN_IP_ADDR" != "" ]; then
|
if [ "$WAN_IP_ADDR" != "" ]; then
|
||||||
send_line_to_vm "2"
|
send_line_to_vm "2"
|
||||||
send_line_to_vm "2"
|
send_line_to_vm "2"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "${WAN_IP_ADDR}"
|
send_line_to_vm "${WAN_IP_ADDR}"
|
||||||
send_line_to_vm "${NETMASK}"
|
send_line_to_vm "${NETMASK}"
|
||||||
send_line_to_vm "${LAN_GW}"
|
send_line_to_vm "${LAN_GW}"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm " "
|
send_line_to_vm " "
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm " "
|
send_line_to_vm " "
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
send_line_to_vm "n"
|
send_line_to_vm "n"
|
||||||
fi
|
fi
|
||||||
sleep 10
|
sleep 10
|
||||||
send_line_to_vm "0"
|
send_line_to_vm "0"
|
||||||
msg_ok "Started OPNsense VM"
|
msg_ok "Started OPNsense VM"
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
if [ "$IP_ADDR" != "" ]; then
|
if [ "$IP_ADDR" != "" ]; then
|
||||||
|
@ -104,13 +104,13 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
function pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
||||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function arch_check() {
|
function arch_check() {
|
||||||
@ -380,7 +380,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
|
@ -84,10 +84,10 @@ function cleanup() {
|
|||||||
}
|
}
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd $TEMP_DIR >/dev/null
|
pushd $TEMP_DIR >/dev/null
|
||||||
if ! command -v whiptail &> /dev/null; then
|
if ! command -v whiptail &>/dev/null; then
|
||||||
echo "Installing whiptail..."
|
echo "Installing whiptail..."
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
apt-get install -y whiptail &>/dev/null
|
apt-get install -y whiptail &>/dev/null
|
||||||
fi
|
fi
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "PiMox HAOS VM" --yesno "This will create a New PiMox HAOS VM. Proceed?" 10 58); then
|
||||||
echo "User selected Yes"
|
echo "User selected Yes"
|
||||||
@ -287,7 +287,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for the HAOS VM?\n\n" \
|
"Which storage pool you would like to use for the HAOS VM?\n\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
|
@ -92,7 +92,7 @@ pushd $TEMP_DIR >/dev/null
|
|||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 22.04 VM" --yesno "This will create a New Ubuntu 22.04 VM. Proceed?" 10 58; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 22.04 VM" --yesno "This will create a New Ubuntu 22.04 VM. Proceed?" 10 58; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
@ -414,7 +414,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -493,11 +493,11 @@ EOF
|
|||||||
)
|
)
|
||||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||||
if [ -n "$DISK_SIZE" ]; then
|
if [ -n "$DISK_SIZE" ]; then
|
||||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||||
else
|
else
|
||||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Created a Ubuntu 22.04 VM ${CL}${BL}(${HN})"
|
msg_ok "Created a Ubuntu 22.04 VM ${CL}${BL}(${HN})"
|
||||||
|
@ -93,7 +93,7 @@ pushd $TEMP_DIR >/dev/null
|
|||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.04 VM" --yesno "This will create a New Ubuntu 24.04 VM. Proceed?" 10 58; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.04 VM" --yesno "This will create a New Ubuntu 24.04 VM. Proceed?" 10 58; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
@ -122,7 +122,7 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
function pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
||||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
@ -414,7 +414,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -493,11 +493,11 @@ EOF
|
|||||||
)
|
)
|
||||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||||
if [ -n "$DISK_SIZE" ]; then
|
if [ -n "$DISK_SIZE" ]; then
|
||||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||||
else
|
else
|
||||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Created a Ubuntu 24.04 VM ${CL}${BL}(${HN})"
|
msg_ok "Created a Ubuntu 24.04 VM ${CL}${BL}(${HN})"
|
||||||
|
@ -92,7 +92,7 @@ pushd $TEMP_DIR >/dev/null
|
|||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.10 VM" --yesno "This will create a New Ubuntu 24.10 VM. Proceed?" 10 58; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Ubuntu 24.10 VM" --yesno "This will create a New Ubuntu 24.10 VM. Proceed?" 10 58; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
@ -121,7 +121,7 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
function pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
|
||||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
@ -414,7 +414,7 @@ else
|
|||||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||||
@ -493,11 +493,11 @@ EOF
|
|||||||
)
|
)
|
||||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||||
if [ -n "$DISK_SIZE" ]; then
|
if [ -n "$DISK_SIZE" ]; then
|
||||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||||
else
|
else
|
||||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "Created a Ubuntu 24.10 VM ${CL}${BL}(${HN})"
|
msg_ok "Created a Ubuntu 24.10 VM ${CL}${BL}(${HN})"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user