Compare commits

..

No commits in common. "754dec41fc960c46acc38faa38b4c97ea0a78044" and "1bd635936a142328051c346378a412f650a939b6" have entirely different histories.

5 changed files with 11 additions and 78 deletions

View File

@ -27,6 +27,7 @@ var_os="alpine"
var_version="3.17" var_version="3.17"
NSAPP=$(echo ${APP,,} | tr -d ' ') NSAPP=$(echo ${APP,,} | tr -d ' ')
var_install="${NSAPP}-v5-install" var_install="${NSAPP}-v5-install"
timezone=$(cat /etc/timezone)
INTEGER='^[0-9]+([.][0-9]+)?$' INTEGER='^[0-9]+([.][0-9]+)?$'
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
@ -338,7 +339,6 @@ function install_script() {
ARCH_CHECK ARCH_CHECK
PVE_CHECK PVE_CHECK
NEXTID=$(pvesh get /cluster/nextid) NEXTID=$(pvesh get /cluster/nextid)
timezone=$(cat /etc/timezone)
header_info header_info
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
header_info header_info
@ -441,7 +441,6 @@ if ! command -v pveversion >/dev/null 2>&1; then
else else
update_script update_script
fi fi
fi
if [ "$VERB" == "yes" ]; then set -x; fi if [ "$VERB" == "yes" ]; then set -x; fi
if [ "$CT_TYPE" == "1" ]; then if [ "$CT_TYPE" == "1" ]; then

View File

@ -27,6 +27,7 @@ var_os="alpine"
var_version="3.17" var_version="3.17"
NSAPP=$(echo ${APP,,} | tr -d ' ') NSAPP=$(echo ${APP,,} | tr -d ' ')
var_install="${NSAPP}-v5-install" var_install="${NSAPP}-v5-install"
timezone=$(cat /etc/timezone)
INTEGER='^[0-9]+([.][0-9]+)?$' INTEGER='^[0-9]+([.][0-9]+)?$'
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
@ -338,7 +339,6 @@ function install_script() {
ARCH_CHECK ARCH_CHECK
PVE_CHECK PVE_CHECK
NEXTID=$(pvesh get /cluster/nextid) NEXTID=$(pvesh get /cluster/nextid)
timezone=$(cat /etc/timezone)
header_info header_info
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
header_info header_info
@ -352,7 +352,6 @@ header_info
} }
function update_script() { function update_script() {
header_info
normal=$(echo "\033[m") normal=$(echo "\033[m")
menu=$(echo "\033[36m") menu=$(echo "\033[36m")
number=$(echo "\033[33m") number=$(echo "\033[33m")

View File

@ -27,6 +27,7 @@ var_os="alpine"
var_version="3.17" var_version="3.17"
NSAPP=$(echo ${APP,,} | tr -d ' ') NSAPP=$(echo ${APP,,} | tr -d ' ')
var_install="${NSAPP}-v5-install" var_install="${NSAPP}-v5-install"
timezone=$(cat /etc/timezone)
INTEGER='^[0-9]+([.][0-9]+)?$' INTEGER='^[0-9]+([.][0-9]+)?$'
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
@ -338,7 +339,6 @@ function install_script() {
ARCH_CHECK ARCH_CHECK
PVE_CHECK PVE_CHECK
NEXTID=$(pvesh get /cluster/nextid) NEXTID=$(pvesh get /cluster/nextid)
timezone=$(cat /etc/timezone)
header_info header_info
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
header_info header_info
@ -352,73 +352,12 @@ header_info
} }
function update_script() { function update_script() {
header_info header_info
normal=$(echo "\033[m") msg_info "Updating ${APP} LXC"
menu=$(echo "\033[36m") apk update &>/dev/null
number=$(echo "\033[33m") apk upgrade &>/dev/null
fgred=$(echo "\033[31m") msg_ok "Updated ${APP} LXC"
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) msg_ok "Update Successfull"
printf "\n${menu}*********************************************${normal}\n"
printf "${menu}**${number} 1)${normal} Update LXC OS + Grafana \n"
printf "${menu}**${number} 2)${normal} Allow 0.0.0.0 for listening \n"
printf "${menu}**${number} 3)${normal} Allow only ${LXCIP} for listening \n"
printf "${menu}*********************************************${normal}\n"
printf "Please choose an option from the menu, or ${fgred}x${normal} to exit."
read opt
while [ "$opt" != "" ]; do
case $opt in
1)
clear
echo -e "${fgred}Update LXC OS${normal}"
msg_info "Updating LXC OS + Grafana"
apk update &>/dev/null
apk upgrade &>/dev/null
msg_ok "Update Successfull"
break
;;
2)
clear
echo -e "${fgred}Updating Grafana Config with IP: ${LXCIP}${normal}"
msg_info "Stopping Grafana"
service grafana stop &>/dev/null
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=0.0.0.0/g" /etc/conf.d/grafana
msg_ok "Restarted Grafana"
service grafana start &>/dev/null
break
;;
3)
clear
echo -e "${fgred}Updating Grafana Config with host IP: ${LXCIP}${normal}"
msg_info "Stopping Grafana"
service grafana stop &>/dev/null
sed -i -e "s/cfg:server.http_addr=.*/cfg:server.http_addr=$LXCIP/g" /etc/conf.d/grafana
msg_ok "Restarted Grafana"
service grafana start &>/dev/null
break
;;
x)
clear
echo -e "⚠ User exited script \n"
exit
;;
\n)
clear
echo -e "⚠ User exited script \n"
exit
;;
*)
clear
echo -e "Please choose an option from the menu"
update_script
;;
esac
done
exit exit
} }
@ -437,7 +376,6 @@ if ! command -v pveversion >/dev/null 2>&1; then
else else
update_script update_script
fi fi
fi
if [ "$VERB" == "yes" ]; then set -x; fi if [ "$VERB" == "yes" ]; then set -x; fi
if [ "$CT_TYPE" == "1" ]; then if [ "$CT_TYPE" == "1" ]; then

View File

@ -27,6 +27,7 @@ var_os="alpine"
var_version="3.17" var_version="3.17"
NSAPP=$(echo ${APP,,} | tr -d ' ') NSAPP=$(echo ${APP,,} | tr -d ' ')
var_install="${NSAPP}-v5-install" var_install="${NSAPP}-v5-install"
timezone=$(cat /etc/timezone)
INTEGER='^[0-9]+([.][0-9]+)?$' INTEGER='^[0-9]+([.][0-9]+)?$'
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
@ -338,7 +339,6 @@ function install_script() {
ARCH_CHECK ARCH_CHECK
PVE_CHECK PVE_CHECK
NEXTID=$(pvesh get /cluster/nextid) NEXTID=$(pvesh get /cluster/nextid)
timezone=$(cat /etc/timezone)
header_info header_info
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
header_info header_info
@ -352,7 +352,6 @@ header_info
} }
function update_script() { function update_script() {
header_info
normal=$(echo "\033[m") normal=$(echo "\033[m")
menu=$(echo "\033[36m") menu=$(echo "\033[36m")
number=$(echo "\033[33m") number=$(echo "\033[33m")
@ -411,7 +410,6 @@ if ! command -v pveversion >/dev/null 2>&1; then
else else
update_script update_script
fi fi
fi
if [ "$VERB" == "yes" ]; then set -x; fi if [ "$VERB" == "yes" ]; then set -x; fi
if [ "$CT_TYPE" == "1" ]; then if [ "$CT_TYPE" == "1" ]; then

View File

@ -27,6 +27,7 @@ var_os="alpine"
var_version="3.17" var_version="3.17"
NSAPP=$(echo ${APP,,} | tr -d ' ') NSAPP=$(echo ${APP,,} | tr -d ' ')
var_install="${NSAPP}-v5-install" var_install="${NSAPP}-v5-install"
timezone=$(cat /etc/timezone)
INTEGER='^[0-9]+([.][0-9]+)?$' INTEGER='^[0-9]+([.][0-9]+)?$'
YW=$(echo "\033[33m") YW=$(echo "\033[33m")
BL=$(echo "\033[36m") BL=$(echo "\033[36m")
@ -338,7 +339,6 @@ function install_script() {
ARCH_CHECK ARCH_CHECK
PVE_CHECK PVE_CHECK
NEXTID=$(pvesh get /cluster/nextid) NEXTID=$(pvesh get /cluster/nextid)
timezone=$(cat /etc/timezone)
header_info header_info
if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
header_info header_info
@ -352,7 +352,6 @@ header_info
} }
function update_script() { function update_script() {
header_info
normal=$(echo "\033[m") normal=$(echo "\033[m")
menu=$(echo "\033[36m") menu=$(echo "\033[36m")
number=$(echo "\033[33m") number=$(echo "\033[33m")