mirror of https://github.com/tteck/Proxmox.git
parent
b078ad6d3d
commit
196c604ec0
|
@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/next/misc/alpin
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
______ ____
|
______ ____
|
||||||
/ ____/________ _/ __/___ _____ ____ _
|
/ ____/________ _/ __/___ _____ ____ _
|
||||||
/ / __/ ___/ __ / /_/ __ / __ \/ __ /
|
/ / __/ ___/ __ / /_/ __ / __ \/ __ /
|
||||||
|
@ -52,36 +52,37 @@ function default_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
while true; do
|
while true; do
|
||||||
CHOICE=$(whiptail --title "SUPPORT" --menu "Select option" --cancel-button Exit-Script 11 58 3 \
|
CHOICE=$(
|
||||||
"1" "Check for Grafana Updates" \
|
whiptail --title "SUPPORT" --menu "Select option" --cancel-button Exit-Script 11 58 3 \
|
||||||
"2" "Allow 0.0.0.0 for listening" \
|
"1" "Check for Grafana Updates" \
|
||||||
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
)
|
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
|
||||||
exit_status=$?
|
)
|
||||||
if [ $exit_status == 1 ] ; then
|
exit_status=$?
|
||||||
|
if [ $exit_status == 1 ]; then
|
||||||
clear
|
clear
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
header_info
|
header_info
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
1 )
|
1)
|
||||||
apk update && apk upgrade
|
apk update && apk upgrade
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
2 )
|
2)
|
||||||
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana
|
||||||
service grafana restart
|
service grafana restart
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
3 )
|
3)
|
||||||
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana
|
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana
|
||||||
service grafana restart
|
service grafana restart
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|
Loading…
Reference in New Issue