mirror of https://github.com/tteck/Proxmox.git
New Menu
and readded IP Change options from "old scripts"
This commit is contained in:
parent
cb24aaadd8
commit
439205d3c3
|
@ -52,17 +52,36 @@ function default_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
"1" "Check for Grafana Updates" ON \
|
while true; do
|
||||||
3>&1 1>&2 2>&3)
|
CHOICE=$(whiptail --title "SUPPORT" --menu "Select option" --cancel-button Exit-Script 11 58 3 \
|
||||||
|
"1" "Check for Grafana Updates" \
|
||||||
header_info
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
if [ "$UPD" == "1" ]; then
|
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
|
||||||
apk update && apk upgrade
|
)
|
||||||
exit;
|
exit_status=$?
|
||||||
else
|
if [ $exit_status == 1 ] ; then
|
||||||
exit-script
|
clear
|
||||||
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
header_info
|
||||||
|
case $CHOICE in
|
||||||
|
1 )
|
||||||
|
apk update && apk upgrade
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
2 )
|
||||||
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana
|
||||||
|
service grafana restart
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
3 )
|
||||||
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana
|
||||||
|
service grafana restart
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|
Loading…
Reference in New Issue