mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-24 14:01:56 +00:00
Update homebridge.sh
This commit is contained in:
parent
1ea0365731
commit
e13011ca6a
@ -78,9 +78,9 @@ show_menu2(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
option_picked(){
|
option_picked(){
|
||||||
message=${@:-"${CL}Error: No message passed"}
|
message2=${@:-"${CL}Error: No message passed"}
|
||||||
printf " ${YW}${message1}${CL}\n"
|
printf " ${YW}${message1}${CL}\n"
|
||||||
printf " ${YW}${message}${CL}\n"
|
printf " ${YW}${message2}${CL}\n"
|
||||||
}
|
}
|
||||||
show_menu2
|
show_menu2
|
||||||
while [ $opt != '' ]
|
while [ $opt != '' ]
|
||||||
@ -113,6 +113,51 @@ while [ $opt != '' ]
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
show_menu3(){
|
||||||
|
printf " ${YW} 1)${GN} Automatic DHCP ${CL}\n"
|
||||||
|
printf " ${YW} 2)${GN} Manual DHCP ${CL}\n"
|
||||||
|
|
||||||
|
printf "Please choose a DHCP Type and hit enter or ${RD}x${CL} to exit."
|
||||||
|
read opt
|
||||||
|
}
|
||||||
|
|
||||||
|
option_picked(){
|
||||||
|
message3=${@:-"${CL}Error: No message passed"}
|
||||||
|
printf " ${YW}${message1}${CL}\n"
|
||||||
|
printf " ${YW}${message2}${CL}\n"
|
||||||
|
printf " ${YW}${message3}${CL}\n"
|
||||||
|
}
|
||||||
|
show_menu3
|
||||||
|
while [ $opt != '' ]
|
||||||
|
do
|
||||||
|
if [ $opt = '' ]; then
|
||||||
|
exit;
|
||||||
|
else
|
||||||
|
case $opt in
|
||||||
|
1) clear;
|
||||||
|
header_info;
|
||||||
|
option_picked "Using Automatic DHCP";
|
||||||
|
DHCP=" "
|
||||||
|
break;
|
||||||
|
;;
|
||||||
|
2) clear;
|
||||||
|
header_info;
|
||||||
|
option_picked "Using Manual DHCP";
|
||||||
|
DHCP="1"
|
||||||
|
break;
|
||||||
|
;;
|
||||||
|
|
||||||
|
x)exit;
|
||||||
|
;;
|
||||||
|
\n)exit;
|
||||||
|
;;
|
||||||
|
*)clear;
|
||||||
|
option_picked "Please choose a DHCP Type from the menu";
|
||||||
|
show_menu3;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o errtrace
|
set -o errtrace
|
||||||
@ -189,6 +234,19 @@ STORAGE_TYPE=$(pvesm status -storage $(pct config $CTID | grep rootfs | awk -F "
|
|||||||
if [ "$STORAGE_TYPE" == "zfspool" ]; then
|
if [ "$STORAGE_TYPE" == "zfspool" ]; then
|
||||||
warn "Some addons may not work due to ZFS not supporting 'fallocate'."
|
warn "Some addons may not work due to ZFS not supporting 'fallocate'."
|
||||||
fi
|
fi
|
||||||
|
if [ "$DHCP" == "1" ]; then
|
||||||
|
MAC=$(pct config $CTID \
|
||||||
|
| grep -i hwaddr \
|
||||||
|
| awk '{print substr($2, 31, length($3) 17 ) }') \
|
||||||
|
|
||||||
|
echo -e "MAC Address ${BL}$MAC${CL}"
|
||||||
|
|
||||||
|
dhcp_reservation(){
|
||||||
|
printf "Please set DHCP reservation and press Enter."
|
||||||
|
read
|
||||||
|
}
|
||||||
|
dhcp_reservation
|
||||||
|
fi
|
||||||
|
|
||||||
echo -en "${GN} Starting LXC Container... "
|
echo -en "${GN} Starting LXC Container... "
|
||||||
pct start $CTID
|
pct start $CTID
|
||||||
|
Loading…
Reference in New Issue
Block a user