|
|
@ -70,40 +70,17 @@ if [ $(pveversion | grep -c "pve-manager/7\.[0-9]") -eq 0 ]; then
|
|
|
|
echo -e "Requires PVE Version 7.0 or higher"
|
|
|
|
echo -e "Requires PVE Version 7.0 or higher"
|
|
|
|
echo -e "Exiting..."
|
|
|
|
echo -e "Exiting..."
|
|
|
|
sleep 2
|
|
|
|
sleep 2
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function ARCH_CHECK() {
|
|
|
|
function ARCH_CHECK() {
|
|
|
|
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
|
|
|
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
|
|
|
echo -e "\n ${CROSS} This script will not work with PiMox! \n"
|
|
|
|
echo -e "\n ${CROSS} This script will not work with PiMox! \n"
|
|
|
|
echo -e "Exiting..."
|
|
|
|
echo -e "Exiting..."
|
|
|
|
sleep 2
|
|
|
|
sleep 2
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if command -v pveversion >/dev/null 2>&1; then
|
|
|
|
|
|
|
|
if (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
|
|
|
|
|
|
|
NEXTID=$(pvesh get /cluster/nextid)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
|
|
|
echo -e "⚠ User exited script \n"
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! command -v pveversion >/dev/null 2>&1; then
|
|
|
|
|
|
|
|
if [[ ! -d /root/umbrel ]]; then
|
|
|
|
|
|
|
|
msg_error "No ${APP} Installation Found!";
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (whiptail --title "${APP} LXC UPDATE" --yesno "This will update ${APP} LXC. Proceed?" 10 58); then
|
|
|
|
|
|
|
|
echo "User selected Update"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
|
|
|
echo -e "⚠ User exited script \n"
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function default_settings() {
|
|
|
|
function default_settings() {
|
|
|
|
echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
|
|
|
|
echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}"
|
|
|
@ -140,7 +117,7 @@ function default_settings() {
|
|
|
|
VLAN=""
|
|
|
|
VLAN=""
|
|
|
|
echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
|
|
|
|
echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
|
|
|
|
SSH="no"
|
|
|
|
SSH="no"
|
|
|
|
echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
|
|
|
|
echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
|
|
|
|
FUSE="no"
|
|
|
|
FUSE="no"
|
|
|
|
echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}"
|
|
|
|
echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}"
|
|
|
|
VERB="no"
|
|
|
|
VERB="no"
|
|
|
@ -312,10 +289,10 @@ function advanced_settings() {
|
|
|
|
SSH="no"
|
|
|
|
SSH="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
|
|
|
|
if (whiptail --defaultno --title "FUSE OVERLAYFS" --yesno "(ZFS) Enable Fuse Overlayfs?" 10 58); then
|
|
|
|
echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}Yes${CL}"
|
|
|
|
echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}Yes${CL}"
|
|
|
|
FUSE="yes"
|
|
|
|
FUSE="yes"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
echo -e "${DGN}(ZFS) Enable Fuse Overlayfs: ${BGN}No${CL}"
|
|
|
|
echo -e "${DGN}Enable Fuse Overlayfs (ZFS): ${BGN}No${CL}"
|
|
|
|
FUSE="no"
|
|
|
|
FUSE="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
|
|
|
if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
|
|
@ -337,6 +314,7 @@ function advanced_settings() {
|
|
|
|
function install_script() {
|
|
|
|
function install_script() {
|
|
|
|
ARCH_CHECK
|
|
|
|
ARCH_CHECK
|
|
|
|
PVE_CHECK
|
|
|
|
PVE_CHECK
|
|
|
|
|
|
|
|
NEXTID=$(pvesh get /cluster/nextid)
|
|
|
|
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
|
|
|
@ -356,7 +334,30 @@ apt-get -y upgrade &>/dev/null
|
|
|
|
msg_ok "Updated ${APP} LXC"
|
|
|
|
msg_ok "Updated ${APP} LXC"
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ! command -v pveversion >/dev/null 2>&1; then update_script; else install_script; fi
|
|
|
|
|
|
|
|
|
|
|
|
if command -v pveversion >/dev/null 2>&1; then
|
|
|
|
|
|
|
|
if ! (whiptail --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
|
|
|
echo -e "⚠ User exited script \n"
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
install_script
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ! command -v pveversion >/dev/null 2>&1 && [[ ! -d /root/umbrel ]]; then
|
|
|
|
|
|
|
|
msg_error "No ${APP} Installation Found!"
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
clear
|
|
|
|
|
|
|
|
echo -e "⚠ User exited script \n"
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
update_script
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$VERB" == "yes" ]; then set -x; fi
|
|
|
|
if [ "$VERB" == "yes" ]; then set -x; fi
|
|
|
|
if [ "$FUSE" == "yes" ]; then
|
|
|
|
if [ "$FUSE" == "yes" ]; then
|
|
|
|
FEATURES="fuse=1,keyctl=1,nesting=1"
|
|
|
|
FEATURES="fuse=1,keyctl=1,nesting=1"
|
|
|
|