mirror of https://github.com/tteck/Proxmox.git
				
				
				
			Compare commits
	
		
			17 Commits
		
	
	
		
			fbdffa0d94
			...
			44cf2d5048
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								 | 
						44cf2d5048 | |
| 
							
							
								 | 
						766adccf7a | |
| 
							
							
								 | 
						2a6d09477f | |
| 
							
							
								 | 
						de1d37ebf2 | |
| 
							
							
								 | 
						939c9fe7d2 | |
| 
							
							
								 | 
						96e040fcb4 | |
| 
							
							
								 | 
						243b65695c | |
| 
							
							
								 | 
						bbfabfc8f6 | |
| 
							
							
								 | 
						187befbb59 | |
| 
							
							
								 | 
						1bd635936a | |
| 
							
							
								 | 
						dcd1a633b8 | |
| 
							
							
								 | 
						cde33cf00e | |
| 
							
							
								 | 
						268a36a871 | |
| 
							
							
								 | 
						ec8fe39712 | |
| 
							
							
								 | 
						54259a84c1 | |
| 
							
							
								 | 
						32a1ccb59a | |
| 
							
							
								 | 
						73cae0aa60 | 
| 
						 | 
					@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- **Alpine-AdGuard Home LXC** (Thanks @nicedevil007)
 | 
					- **Alpine-AdGuard Home LXC** (Thanks @nicedevil007)
 | 
				
			||||||
  - NEW Script
 | 
					  - NEW Script
 | 
				
			||||||
 | 
					- **Alpine-Docker LXC**
 | 
				
			||||||
 | 
					  - NEW Script
 | 
				
			||||||
 | 
					- **Alpine-Zigbee2MQTT LXC**
 | 
				
			||||||
 | 
					  - NEW Script
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 2023-03-15
 | 
					## 2023-03-15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,6 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -435,12 +434,12 @@ if command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  install_script
 | 
					  install_script
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /opt/AdGuardHome ]]; then
 | 
					 | 
				
			||||||
  msg_error "No ${APP} Installation Found!"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1; then
 | 
					if ! command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  update_script
 | 
					  if [[ ! -d /opt/AdGuardHome ]]; then
 | 
				
			||||||
 | 
					    msg_error "No ${APP} Installation Found!"
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    update_script
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$VERB" == "yes" ]; then set -x; fi
 | 
					if [ "$VERB" == "yes" ]; then set -x; fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,6 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -352,6 +351,7 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -396,12 +396,12 @@ if command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  install_script
 | 
					  install_script
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then
 | 
					if ! command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  msg_error "No ${APP} Installation Found!"
 | 
					  if [[ ! -d /etc/docker ]]; then
 | 
				
			||||||
fi
 | 
					    msg_error "No ${APP} Installation Found!"
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/zigbee2mqtt/configuration.yaml ]]; then
 | 
					    update_script
 | 
				
			||||||
  update_script  
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$VERB" == "yes" ]; then set -x; fi
 | 
					if [ "$VERB" == "yes" ]; then set -x; fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,6 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -352,12 +351,73 @@ header_info
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function update_script() {
 | 
					function update_script() {
 | 
				
			||||||
header_info
 | 
					    header_info
 | 
				
			||||||
msg_info "Updating ${APP} LXC"
 | 
					    normal=$(echo "\033[m")
 | 
				
			||||||
apk update &>/dev/null
 | 
					    menu=$(echo "\033[36m")
 | 
				
			||||||
apk upgrade &>/dev/null
 | 
					    number=$(echo "\033[33m")
 | 
				
			||||||
msg_ok "Updated ${APP} LXC"
 | 
					    fgred=$(echo "\033[31m")
 | 
				
			||||||
msg_ok "Update Successfull"
 | 
					    LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
 | 
				
			||||||
 | 
					    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
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -371,12 +431,11 @@ if command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1; then
 | 
					if ! command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  if ! (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC.  Proceed?" 10 58); then
 | 
					  if [[ ! -f /etc/conf.d/grafana ]]; then
 | 
				
			||||||
    clear
 | 
					    msg_error "No ${APP} Installation Found!"
 | 
				
			||||||
    echo -e "⚠  User exited script \n"
 | 
					  else
 | 
				
			||||||
    exit
 | 
					    update_script
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  update_script  
 | 
					 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$VERB" == "yes" ]; then set -x; fi
 | 
					if [ "$VERB" == "yes" ]; then set -x; fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,6 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -352,6 +351,7 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -404,12 +404,12 @@ if command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  install_script
 | 
					  install_script
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/conf.d/vaultwarden ]]; then
 | 
					if ! command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  msg_error "No ${APP} Installation Found!"
 | 
					  if [[ ! -f /etc/conf.d/vaultwarden ]]; then
 | 
				
			||||||
fi
 | 
					    msg_error "No ${APP} Installation Found!"
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/conf.d/vaultwarden ]]; then
 | 
					    update_script
 | 
				
			||||||
  update_script  
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$VERB" == "yes" ]; then set -x; fi
 | 
					if [ "$VERB" == "yes" ]; then set -x; fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,6 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -352,6 +351,7 @@ 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")
 | 
				
			||||||
| 
						 | 
					@ -396,12 +396,12 @@ if command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  install_script
 | 
					  install_script
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1 && [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then
 | 
					if ! command -v pveversion >/dev/null 2>&1; then
 | 
				
			||||||
  msg_error "No ${APP} Installation Found!"
 | 
					  if [[ ! -f /etc/zigbee2mqtt/configuration.yaml ]]; then
 | 
				
			||||||
fi
 | 
					    msg_error "No ${APP} Installation Found!"
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
if ! command -v pveversion >/dev/null 2>&1 && [[ -f /etc/zigbee2mqtt/configuration.yaml ]]; then
 | 
					    update_script
 | 
				
			||||||
  update_script  
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$VERB" == "yes" ]; then set -x; fi
 | 
					if [ "$VERB" == "yes" ]; then set -x; fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,8 +67,8 @@ if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | c
 | 
				
			||||||
  exit 1
 | 
					  exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
cat <<EOF >/etc/apk/repositories
 | 
					cat <<EOF >/etc/apk/repositories
 | 
				
			||||||
https://dl-cdn.alpinelinux.org/alpine/edge/main
 | 
					https://dl-cdn.alpinelinux.org/alpine/latest-stable/main
 | 
				
			||||||
https://dl-cdn.alpinelinux.org/alpine/edge/community
 | 
					https://dl-cdn.alpinelinux.org/alpine/latest-stable/community
 | 
				
			||||||
https://dl-cdn.alpinelinux.org/alpine/edge/testing
 | 
					https://dl-cdn.alpinelinux.org/alpine/edge/testing
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
msg_ok "Set up Container OS"
 | 
					msg_ok "Set up Container OS"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,8 +67,8 @@ if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | c
 | 
				
			||||||
  exit 1
 | 
					  exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
cat <<EOF >/etc/apk/repositories
 | 
					cat <<EOF >/etc/apk/repositories
 | 
				
			||||||
https://dl-cdn.alpinelinux.org/alpine/edge/main
 | 
					https://dl-cdn.alpinelinux.org/alpine/latest-stable/main
 | 
				
			||||||
https://dl-cdn.alpinelinux.org/alpine/edge/community
 | 
					https://dl-cdn.alpinelinux.org/alpine/latest-stable/community
 | 
				
			||||||
https://dl-cdn.alpinelinux.org/alpine/edge/testing
 | 
					https://dl-cdn.alpinelinux.org/alpine/edge/testing
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
msg_ok "Set up Container OS"
 | 
					msg_ok "Set up Container OS"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue