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
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PMG SOURCES" --menu "This will set the correct sources to update and install Proxmox Mail Gateway.\n \nChange to Proxmox Mail Gateway sources?" 14 58 2 \
"This will set the correct Debian sources for Proxmox Mail Gateway.\n\nCorrect sources?" 14 58 2 \
50
78
"yes""" \
51
79
"no"""3>&22>&11>&3)
52
80
case$CHOICEin
53
81
yes)
54
-
msg_info "Changing to Proxmox Mail Gateway Sources"
82
+
msg_info "Correcting Debian Sources"
55
83
cat <<EOF >/etc/apt/sources.list
56
84
deb http://deb.debian.org/debian ${VERSION} main contrib
57
85
deb http://deb.debian.org/debian ${VERSION}-updates main contrib
58
86
deb http://security.debian.org/debian-security ${VERSION}-security main contrib
59
87
EOF
60
-
msg_ok "Changed to Proxmox Mail Gateway Sources"
61
-
;;
62
-
no)
63
-
msg_error "Selected no to Correcting Proxmox Mail Gateway Sources"
88
+
msg_ok "Corrected Debian Sources"
64
89
;;
90
+
no) msg_error "Selected no to Correcting Debian Sources" ;;
65
91
esac
66
92
67
-
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PMG-ENTERPRISE" --menu "The 'pmg-enterprise' repository is only available to users who have purchased a Proxmox Mail Gateway subscription.\n \nDisable 'pmg-enterprise' repository?" 14 58 2 \
deb https://enterprise.proxmox.com/debian/pmg ${VERSION} pmg-enterprise
150
+
EOF
151
+
msg_ok "Added 'pmg-enterprise' repository"
152
+
;;
153
+
no) msg_error "Selected no to Adding 'pmg-enterprise' repository" ;;
154
+
esac
80
155
;;
81
156
esac
82
157
83
-
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PMG-NO-SUBSCRIPTION" --menu "The 'pmg-no-subscription' repository provides access to all of the open-source components of Proxmox Mail Gateway.\n \nEnable 'pmg-no-subscription' repository?" 14 58 2 \
deb http://download.proxmox.com/debian/pmg ${VERSION} pmg-no-subscription
91
214
EOF
92
-
msg_ok "Enabled 'pmg-no-subscription' repository"
93
-
;;
94
-
no)
95
-
msg_error "Selected no to enabling 'pmg-no-subscription' repository"
215
+
msg_ok "Added 'pmg-no-subscription' repository"
216
+
;;
217
+
no) msg_error "Selected no to Adding 'pmg-no-subscription' repository" ;;
218
+
esac
96
219
;;
97
220
esac
98
221
99
-
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "PMG TEST" --menu "The 'pmgtest' repository can give advanced users access to new features and updates before they are officially released.\n \nAdd (Disabled) 'pmgtest' repository?" 14 58 2 \
100
-
"yes""" \
101
-
"no"""3>&22>&11>&3)
102
-
case$CHOICEin
103
-
yes)
104
-
msg_info "Adding 'pmgtest' repository and set disabled"
# deb http://download.proxmox.com/debian/pmg ${VERSION} pmgtest
107
237
EOF
108
-
msg_ok "Added 'pmgtest' repository"
109
-
;;
110
-
no)
111
-
msg_error "Selected no to adding 'pmgtest' repository"
238
+
msg_ok "Added 'pmgtest' repository"
239
+
;;
240
+
no) msg_error "Selected no to Adding 'pmgtest' repository" ;;
241
+
esac
112
242
;;
113
243
esac
114
244
115
-
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUBSCRIPTION NAG" --menu "This will disable the nag message reminding you to purchase a subscription every time you log in to the web interface.\n \nDisable subscription nag?" 14 58 2 \
"Disable subscription nag in PMG UI?" 14 58 2 "yes""""no"""3>&22>&11>&3)
118
248
case$CHOICEin
119
249
yes)
120
-
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions""Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
sed -i '/data\.status/{s/\\!//;s/active/NoMoreNagging/}' /usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js;
260
+
fi";
261
+
};
262
+
EOF
263
+
msg_ok "Disabled subscription nag (clear browser cache!)"
127
264
;;
128
265
no)
129
-
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions""Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
130
-
msg_error "Selected no to disabling subscription nag"
266
+
msg_error "Selected no to Disabling subscription nag"
Please run this script on every PMG node individually if you have multiple nodes.
290
+
291
+
After completing these steps, it is strongly recommended to REBOOT your node.
292
+
293
+
After the upgrade or post-install routines, always clear your browser cache or perform a hard reload (Ctrl+Shift+R) before using the PMG Web UI to avoid UI display issues." 20 80
294
+
295
+
# ---- REBOOT ----
296
+
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "REBOOT" --menu \
297
+
"Reboot Proxmox Mail Gateway now? (recommended)" 11 58 2 "yes""""no"""3>&22>&11>&3)
153
298
case$CHOICEin
154
299
yes)
155
300
msg_info "Rebooting Proxmox Mail Gateway"
@@ -158,7 +303,7 @@ EOF
158
303
reboot
159
304
;;
160
305
no)
161
-
msg_error "Selected no to reboot Proxmox Mail Gateway (Reboot recommended)"
306
+
msg_error "Selected no to reboot (Reboot recommended)"
162
307
msg_ok "Completed Post Install Routines"
163
308
;;
164
309
esac
@@ -167,7 +312,7 @@ EOF
167
312
header_info
168
313
echo -e "\nThis script will Perform Post Install Routines.\n"
169
314
whiletrue;do
170
-
read -p"Start the Proxmox Mail Gateway Post Install Script (y/n)?" yn
315
+
read -rp"Start the Proxmox Mail Gateway Post Install Script (y/n)?" yn
0 commit comments