You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 23, 2025. It is now read-only.
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
7
7
8
8
variables() {
9
-
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
9
+
NSAPP=$(echo "${APP,,}" | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
10
10
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
11
11
INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern.
12
12
PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase
@@ -70,7 +70,7 @@ catch_errors() {
70
70
# This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message.
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
73
+
if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
74
74
printf "\e[?25h"
75
75
local exit_code="$?"
76
76
local line_number="$1"
@@ -285,25 +285,25 @@ update_motd_ip() {
285
285
286
286
# Function to download & save header files
287
287
get_header() {
288
-
local app_name=$(echo "${APP,,}" | tr -d ' ')
289
-
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/headers/${app_name}"
290
-
local local_header_path="$HOME/.config/incusscripts/headers/${app_name}"
288
+
local app_name=$(echo "${APP,,}" | tr -d ' ')
289
+
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/headers/${app_name}"
290
+
local local_header_path="$HOME/.config/incusscripts/headers/${app_name}"
291
291
292
-
mkdir -p "$(dirname "$local_header_path")"
292
+
mkdir -p "$(dirname "$local_header_path")"
293
293
294
-
if [ ! -s "$local_header_path" ]; then
295
-
if ! curl -fsSL "$header_url" -o "$local_header_path"; then
296
-
echo -e "Failed to download header for ${app_name}. No header will be displayed."
297
-
return 1
298
-
fi
294
+
if [ ! -s "$local_header_path" ]; then
295
+
if ! curl -fsSL "$header_url" -o "$local_header_path"; then
296
+
echo -e "Failed to download header for ${app_name}. No header will be displayed."
297
+
return 1
299
298
fi
299
+
fi
300
300
301
-
cat "$local_header_path"
301
+
cat "$local_header_path"
302
302
}
303
303
304
304
# This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node.
305
305
header_info() {
306
-
local app_name=$(echo ${APP,,} | tr -d ' ')
306
+
local app_name=$(echo "${APP,,}" | tr -d ' ')
307
307
local header_content
308
308
309
309
# Download & save Header-File locally
@@ -407,128 +407,6 @@ exit_script() {
407
407
# This function allows the user to configure advanced settings for the script.
408
408
advanced_settings() {
409
409
whiptail --backtitle "Incus Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
410
-
whiptail --backtitle "Incus Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58
if MTU1=$(whiptail --backtitle "Incus Scripts" --inputbox "Set Interface MTU Size (leave blank for default [The MTU of your selected vmbr, default is 1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
730
-
if [ -z $MTU1 ]; then
612
+
if [ -z "$MTU1" ]; then
731
613
MTU1="Default"
732
614
MTU=""
733
615
else
@@ -739,7 +621,7 @@ advanced_settings() {
739
621
fi
740
622
741
623
if SD=$(whiptail --backtitle "Incus Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then
742
-
if [ -z $SD ]; then
624
+
if [ -z "$SD" ]; then
743
625
SX=Host
744
626
SD=""
745
627
else
@@ -752,7 +634,7 @@ advanced_settings() {
752
634
fi
753
635
754
636
if NX=$(whiptail --backtitle "Incus Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then
755
-
if [ -z $NX ]; then
637
+
if [ -z "$NX" ]; then
756
638
NX=Host
757
639
NS=""
758
640
else
@@ -764,7 +646,7 @@ advanced_settings() {
764
646
fi
765
647
766
648
if MAC1=$(whiptail --backtitle "Incus Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then
767
-
if [ -z $MAC1 ]; then
649
+
if [ -z "$MAC1" ]; then
768
650
MAC1="Default"
769
651
MAC=""
770
652
else
@@ -776,7 +658,7 @@ advanced_settings() {
776
658
fi
777
659
778
660
if VLAN1=$(whiptail --backtitle "Incus Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
779
-
if [ -z $VLAN1 ]; then
661
+
if [ -z "$VLAN1" ]; then
780
662
VLAN1="Default"
781
663
VLAN=""
782
664
else
@@ -787,7 +669,7 @@ advanced_settings() {
787
669
exit_script
788
670
fi
789
671
790
-
if ADV_TAGS=$(whiptail --backtitle "Incus Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then
672
+
if ADV_TAGS=$(whiptail --backtitle "Incus Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3); then
0 commit comments