From 571c46f8c4ceb83475b01c1ec9360a413a0d4b42 Mon Sep 17 00:00:00 2001 From: X-Anonymous-Y Date: Fri, 28 Jul 2023 23:25:35 +0200 Subject: [PATCH] Cleaned up and formatted code # Cleaned up and formatted code ## Description Just cleaned and formatted the script codes Fixes # (issue) Remove unnecessary spaces ## Type of change Please delete options that are not relevant. - [x] Bug fix - [ ] New feature - [ ] New Script - [ ] This change requires a documentation update --- ct/adguard.sh | 49 +- ct/alpine-vaultwarden.sh | 2 +- ct/alpine.sh | 20 +- ct/archlinux.sh | 502 +++++++++--------- ct/audiobookshelf.sh | 21 +- ct/autobrr.sh | 39 +- ct/bazarr.sh | 21 +- ct/blocky.sh | 21 +- ct/casaos.sh | 21 +- ct/changedetection.sh | 19 +- ct/cloudflared.sh | 21 +- ct/create_lxc.sh | 4 +- ct/cronicle.sh | 91 ++-- ct/daemonsync.sh | 21 +- ct/dashy.sh | 63 +-- ct/debian.sh | 21 +- ct/deconz.sh | 21 +- ct/deluge.sh | 21 +- ct/devuan.sh | 21 +- ct/docker.sh | 21 +- ct/emby.sh | 39 +- ct/emqx.sh | 21 +- ct/esphome.sh | 39 +- ct/fhem.sh | 21 +- ct/go2rtc.sh | 29 +- ct/grafana.sh | 27 +- ct/grocy.sh | 19 +- ct/heimdalldashboard.sh | 141 ++--- ct/homebridge.sh | 21 +- ct/homepage.sh | 33 +- ct/homer.sh | 61 ++- ct/hyperion.sh | 21 +- ct/influxdb.sh | 29 +- ct/iobroker.sh | 21 +- ct/jackett.sh | 21 +- ct/jellyfin.sh | 21 +- ct/k0s.sh | 21 +- ct/kavita.sh | 21 +- ct/keycloak.sh | 21 +- ct/lidarr.sh | 21 +- ct/magicmirror.sh | 23 +- ct/mariadb.sh | 21 +- ct/meshcentral.sh | 21 +- ct/motioneye.sh | 19 +- ct/mqtt.sh | 21 +- ct/n8n.sh | 19 +- ct/navidrome.sh | 39 +- ct/nextcloudpi.sh | 21 +- ct/nocodb.sh | 25 +- ct/node-red.sh | 87 +-- ct/octoprint.sh | 35 +- ct/omada.sh | 21 +- ct/ombi.sh | 15 +- ct/omv.sh | 21 +- ct/openhab.sh | 21 +- ct/openobserve.sh | 25 +- ct/pihole.sh | 21 +- ct/plex.sh | 43 +- ct/podman-homeassistant.sh | 119 +++-- ct/podman.sh | 21 +- ct/postgresql.sh | 21 +- ct/prometheus.sh | 21 +- ct/prowlarr.sh | 21 +- ct/qbittorrent.sh | 21 +- ct/radarr.sh | 21 +- ct/rdtclient.sh | 21 +- ct/readarr.sh | 21 +- ct/rockylinux.sh | 21 +- ct/rtsptoweb.sh | 21 +- ct/sabnzbd.sh | 33 +- ct/scrypted.sh | 21 +- ct/shinobi.sh | 27 +- ct/sonarr.sh | 21 +- ct/syncthing.sh | 21 +- ct/tautulli.sh | 21 +- ct/tdarr.sh | 21 +- ct/technitiumdns.sh | 23 +- ct/transmission.sh | 21 +- ct/trilium.sh | 51 +- ct/ubuntu.sh | 21 +- ct/umbrel.sh | 16 +- ct/unifi.sh | 21 +- ct/uptimekuma.sh | 47 +- ct/whisparr.sh | 21 +- ct/whoogle.sh | 19 +- ct/wikijs.sh | 57 +- ct/wireguard.sh | 99 ++-- ct/yunohost.sh | 21 +- ct/zoraxy.sh | 15 +- install/adguard-install.sh | 2 +- install/alpine-docker-install.sh | 6 +- install/alpine-grafana-install.sh | 4 +- install/alpine-vaultwarden-install.sh | 4 +- install/alpine-zigbee2mqtt-install.sh | 4 +- install/audiobookshelf-install.sh | 2 +- install/autobrr-install.sh | 2 +- install/bazarr-install.sh | 4 +- install/blocky-install.sh | 2 +- install/casaos-install.sh | 16 +- install/changedetection-install.sh | 2 +- install/cloudflared-install.sh | 2 +- install/cronicle-install.sh | 2 +- install/daemonsync-install.sh | 2 +- install/dashy-install.sh | 2 +- install/debian-install.sh | 4 +- install/deconz-install.sh | 2 +- install/deluge-install.sh | 2 +- install/devuan-install.sh | 2 +- install/emby-install.sh | 8 +- install/emqx-install.sh | 2 +- install/fhem-install.sh | 2 +- install/go2rtc-install.sh | 2 +- install/grafana-install.sh | 2 +- install/grocy-install.sh | 2 +- install/heimdalldashboard-install.sh | 2 +- install/homebridge-install.sh | 2 +- install/homepage-install.sh | 2 +- install/homer-install.sh | 2 +- install/hyperion-install.sh | 2 +- install/influxdb-install.sh | 4 +- install/iobroker-install.sh | 2 +- install/jackett-install.sh | 2 +- install/jellyfin-install.sh | 12 +- install/k0s-install.sh | 10 +- install/kavita-install.sh | 2 +- install/keycloak-install.sh | 2 +- install/lidarr-install.sh | 2 +- install/magicmirror-install.sh | 2 +- install/mariadb-install.sh | 2 +- install/meshcentral-install.sh | 2 +- install/motioneye-install.sh | 2 +- install/mqtt-install.sh | 2 +- install/n8n-install.sh | 2 +- install/navidrome-install.sh | 2 +- install/nextcloudpi-install.sh | 2 +- install/nocodb-install.sh | 2 +- install/node-red-install.sh | 2 +- install/octoprint-install.sh | 4 +- install/omada-install.sh | 4 +- install/ombi-install.sh | 2 +- install/omv-install.sh | 2 +- install/openhab-install.sh | 4 +- install/openobserve-install.sh | 2 +- install/photoprism-install.sh | 2 +- install/pihole-install.sh | 2 +- install/plex-install.sh | 10 +- install/podman-homeassistant-install.sh | 2 +- install/podman-install.sh | 4 +- install/postgresql-install.sh | 2 +- install/prometheus-install.sh | 2 +- install/prowlarr-install.sh | 2 +- install/qbittorrent-install.sh | 2 +- install/radarr-install.sh | 2 +- install/rdtclient-install.sh | 2 +- install/readarr-install.sh | 2 +- install/rtsptoweb-install.sh | 2 +- install/sabnzbd-install.sh | 2 +- install/scrypted-install.sh | 82 +-- install/shinobi-install.sh | 8 +- install/sonarr-install.sh | 4 +- install/syncthing-install.sh | 2 +- install/tautulli-install.sh | 2 +- install/tdarr-install.sh | 4 +- install/technitiumdns-install.sh | 2 +- install/transmission-install.sh | 3 +- install/trilium-install.sh | 2 +- install/ubuntu-install.sh | 2 +- install/umbrel-install.sh | 16 +- install/unifi-install.sh | 2 +- install/uptimekuma-install.sh | 2 +- install/whisparr-install.sh | 4 +- install/whoogle-install.sh | 2 +- install/wikijs-install.sh | 2 +- install/wireguard-install.sh | 2 +- install/yunohost-install.sh | 2 +- install/zigbee2mqtt-install.sh | 4 +- install/zoraxy-install.sh | 2 +- install/zwave-js-ui-install.sh | 2 +- misc/add-tailscale-lxc.sh | 2 +- misc/alpine-install.func | 8 +- misc/bluetooth.sh | 17 +- misc/clean.sh | 4 +- misc/code-server.sh | 5 +- misc/container-restore-from-backup.sh | 5 +- ...iner-copy-data-home-assistant-container.sh | 5 +- ...container-copy-data-home-assistant-core.sh | 5 +- ...ntainer-copy-data-podman-home-assistant.sh | 5 +- ...core-copy-data-home-assistant-container.sh | 5 +- ...tant-core-copy-data-home-assistant-core.sh | 5 +- misc/copy-data/plex-copy-data-plex.sh | 5 +- ...tant-copy-data-home-assistant-container.sh | 5 +- misc/copy-data/z2m-copy-data-z2m.sh | 5 +- .../zwavejs2mqtt-copy-data-zwavejsui.sh | 5 +- misc/core-restore-from-backup.sh | 5 +- misc/crowdsec.sh | 5 +- misc/edge-kernel.sh | 2 +- misc/kernel-clean.sh | 24 +- misc/microcode.sh | 6 +- misc/monitor-all.sh | 64 +-- misc/olivetin.sh | 16 +- misc/pbs3-upgrade.sh | 6 +- misc/post-pbs-install.sh | 10 +- misc/post-pve-install.sh | 9 +- misc/pve8-upgrade.sh | 43 +- misc/pyenv.sh | 95 ++-- misc/scaling-governor.sh | 9 +- misc/update-lxcs.sh | 14 +- 207 files changed, 2074 insertions(+), 1769 deletions(-) diff --git a/ct/adguard.sh b/ct/adguard.sh index 807800c3..4ce9c62b 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ __ __ / | ____/ /___ ___ ______ __________/ / / /| |/ __ / __ / / / / __ / ___/ __ / @@ -52,30 +52,33 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz -msg_info "Stopping AdguardHome" -systemctl stop AdGuardHome -msg_ok "Stopped AdguardHome" + header_info + if [[ ! -d /opt/AdGuardHome ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + wget -qL https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz + msg_info "Stopping AdguardHome" + systemctl stop AdGuardHome + msg_ok "Stopped AdguardHome" -msg_info "Updating AdguardHome" -tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null -mkdir -p adguard-backup -cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ -cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome -cp -r adguard-backup/* /opt/AdGuardHome/ -msg_ok "Updated AdguardHome" + msg_info "Updating AdguardHome" + tar -xvf AdGuardHome_linux_amd64.tar.gz &>/dev/null + mkdir -p adguard-backup + cp -r /opt/AdGuardHome/AdGuardHome.yaml /opt/AdGuardHome/data adguard-backup/ + cp AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome + cp -r adguard-backup/* /opt/AdGuardHome/ + msg_ok "Updated AdguardHome" -msg_info "Starting AdguardHome" -systemctl start AdGuardHome -msg_ok "Started AdguardHome" + msg_info "Starting AdguardHome" + systemctl start AdGuardHome + msg_ok "Started AdguardHome" -msg_info "Cleaning Up" -rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup -msg_ok "Cleaned" -msg_ok "Updated Successfully" -exit + msg_info "Cleaning Up" + rm -rf AdGuardHome_linux_amd64.tar.gz AdGuardHome adguard-backup + msg_ok "Cleaned" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 32b9f946..b7583021 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -83,7 +83,7 @@ function update_script() { sed -i "s|\"admin_token\": .*|\"admin_token\": \"${TOKEN}\",|" /var/lib/vaultwarden/config.json fi rc-service vaultwarden restart -q - fi + fi clear exit ;; diff --git a/ct/alpine.sh b/ct/alpine.sh index 3be89e7b..a9114cae 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ __ _ / | / /___ (_)___ ___ / /| | / / __ \/ / __ \/ _ \ @@ -52,15 +52,15 @@ function default_settings() { } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ - "1" "Check for Alpine Updates" ON \ - 3>&1 1>&2 2>&3) + UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ + "1" "Check for Alpine Updates" ON \ + 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -apk update && apk upgrade -exit; -fi + header_info + if [ "$UPD" == "1" ]; then + apk update && apk upgrade + exit + fi } start diff --git a/ct/archlinux.sh b/ct/archlinux.sh index f7b8e6cc..ddc87437 100644 --- a/ct/archlinux.sh +++ b/ct/archlinux.sh @@ -6,8 +6,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ __ __ _ / | __________/ /_ / / (_)___ __ ___ __ / /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ @@ -42,84 +42,84 @@ CROSS="${RD}✗${CL}" set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR function error_handler() { - local exit_code="$?" - local line_number="$1" - local command="$2" - local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - echo -e "\n$error_message\n" + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" } function msg_info() { - local msg="$1" - echo -ne " ${HOLD} ${YW}${msg}..." + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." } function msg_ok() { - local msg="$1" - echo -e "${BFR} ${CM} ${GN}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - local msg="$1" - echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } function PVE_CHECK() { - if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE Version 7.2 or higher" - echo -e "Exiting..." - sleep 2 - exit - fi + if ! pveversion | grep -Eq "pve-manager/(7\.[2-9]|8\.[0-9])"; then + echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" + echo -e "Requires PVE Version 7.2 or higher" + echo -e "Exiting..." + sleep 2 + exit + fi } function ARCH_CHECK() { -if [ "$(dpkg --print-architecture)" != "amd64" ]; then - echo -e "\n ${CROSS} This script will not work with PiMox! \n" - echo -e "Exiting..." - sleep 2 -exit -fi + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi } function default_settings() { - echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" - CT_TYPE="1" - echo -e "${DGN}Using Root Password: ${BGN}archlinux${CL}" - PW="-password archlinux" - echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" - CT_ID=$NEXTID - echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" - HN=$NSAPP - echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" - DISK_SIZE="$var_disk" - echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" - RAM_SIZE="$var_ram" - echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" - BRG="vmbr0" - echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" - NET="dhcp" - echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - GATE="" - echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" - DISABLEIP6="no" - echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" - MTU="" - echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" - SD="" - echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" - NS="" - echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" - MAC="" - echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" - VLAN="" - echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" - SSH="no" - echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" - VERB="no" - echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" + echo -e "${DGN}Using Container Type: ${BGN}Unprivileged${CL} ${RD}NO DEVICE PASSTHROUGH${CL}" + CT_TYPE="1" + echo -e "${DGN}Using Root Password: ${BGN}archlinux${CL}" + PW="-password archlinux" + echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}" + CT_ID=$NEXTID + echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}" + HN=$NSAPP + echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}" + DISK_SIZE="$var_disk" + echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}" + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}" + RAM_SIZE="$var_ram" + echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}" + BRG="vmbr0" + echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" + NET="dhcp" + echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" + GATE="" + echo -e "${DGN}Disable IPv6: ${BGN}No${CL}" + DISABLEIP6="no" + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + MTU="" + echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}" + SD="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" + echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" + MAC="" + echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" + VLAN="" + echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}" + SSH="no" + echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}" + VERB="no" + echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}" } function exit-script() { @@ -129,263 +129,263 @@ function exit-script() { } function advanced_settings() { -if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF \ - 3>&1 1>&2 2>&3); then - echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" -else - exit-script -fi - -if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then - if [ -z $PW1 ]; then - PW1="Automatic Login" - PW=" " + if CT_TYPE=$(whiptail --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \ + "1" "Unprivileged" ON \ + "0" "Privileged" OFF \ + 3>&1 1>&2 2>&3); then + echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}" else - PW="-password $PW1" + exit-script fi - echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" -else - exit-script -fi -if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then - if [ -z "$CT_ID" ]; then - CT_ID="$NEXTID" - echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + if PW1=$(whiptail --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then + if [ -z $PW1 ]; then + PW1="Automatic Login" + PW=" " + else + PW="-password $PW1" + fi + echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}" else - echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + exit-script fi -else - exit -fi -if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then - if [ -z "$CT_NAME" ]; then - HN="$NSAPP" + if CT_ID=$(whiptail --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then + if [ -z "$CT_ID" ]; then + CT_ID="$NEXTID" + echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}" + else + echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}" + fi else - HN=$(echo ${CT_NAME,,} | tr -d ' ') + exit fi - echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" -else - exit-script -fi -if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then - if [ -z "$DISK_SIZE" ]; then - DISK_SIZE="$var_disk" - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + if CT_NAME=$(whiptail --inputbox "Set Hostname" 8 58 $NSAPP --title "HOSTNAME" 3>&1 1>&2 2>&3); then + if [ -z "$CT_NAME" ]; then + HN="$NSAPP" else - if ! [[ $DISK_SIZE =~ $INTEGER ]]; then - echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" - advanced_settings + HN=$(echo ${CT_NAME,,} | tr -d ' ') fi - echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + exit-script fi -else - exit-script -fi -if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then - if [ -z "$CORE_COUNT" ]; then - CORE_COUNT="$var_cpu" - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + if DISK_SIZE=$(whiptail --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then + if [ -z "$DISK_SIZE" ]; then + DISK_SIZE="$var_disk" + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + else + if ! [[ $DISK_SIZE =~ $INTEGER ]]; then + echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" + advanced_settings + fi + echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}" + fi else - echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + exit-script fi -else - exit-script -fi -if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then - if [ -z "$RAM_SIZE" ]; then - RAM_SIZE="$var_ram" - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then + if [ -z "$CORE_COUNT" ]; then + CORE_COUNT="$var_cpu" + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + fi else - echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + exit-script fi -else - exit-script -fi -if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then - if [ -z "$BRG" ]; then - BRG="vmbr0" - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + if RAM_SIZE=$(whiptail --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then + if [ -z "$RAM_SIZE" ]; then + RAM_SIZE="$var_ram" + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + fi else - echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + exit-script fi -else - exit-script -fi -if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $NET ]; then - NET="dhcp" - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + if BRG=$(whiptail --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then + if [ -z "$BRG" ]; then + BRG="vmbr0" + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + else + echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}" + fi else - echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + exit-script fi -else - exit-script -fi -if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then - if [ -z $GATE1 ]; then - GATE1="Default" - GATE="" + + if NET=$(whiptail --inputbox "Set a Static IPv4 CIDR Address(/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $NET ]; then + NET="dhcp" + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + else + echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}" + fi else - GATE=",gw=$GATE1" + exit-script fi + if GATE1=$(whiptail --inputbox "Set a Gateway IP (mandatory if Static IP was used)" 8 58 --title "GATEWAY IP" 3>&1 1>&2 2>&3); then + if [ -z $GATE1 ]; then + GATE1="Default" + GATE="" + else + GATE=",gw=$GATE1" + fi echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" -else - exit-script -fi + else + exit-script + fi -if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then - DISABLEIP6="yes" -else - DISABLEIP6="no" -fi + if (whiptail --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then + DISABLEIP6="yes" + else + DISABLEIP6="no" + fi echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" -if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then - if [ -z $MTU1 ]; then - MTU1="Default" - MTU="" + if MTU1=$(whiptail --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + else + MTU=",mtu=$MTU1" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" else - MTU=",mtu=$MTU1" + exit-script fi - echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}" -else - exit-script -fi -if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then - if [ -z $SD ]; then - SX=Host - SD="" + if SD=$(whiptail --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then + if [ -z $SD ]; then + SX=Host + SD="" + else + SX=$SD + SD="-searchdomain=$SD" + fi + echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" else - SX=$SD - SD="-searchdomain=$SD" + exit-script fi - echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}" -else - exit-script -fi -if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then - if [ -z $NX ]; then - NX=Host - NS="" + if NX=$(whiptail --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then + if [ -z $NX ]; then + NX=Host + NS="" + else + NS="-nameserver=$NX" + fi + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" else - NS="-nameserver=$NX" + exit-script fi - echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}" -else - exit-script -fi -if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then - if [ -z $MAC1 ]; then - MAC1="Default" - MAC="" + if MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC1="Default" + MAC="" + else + MAC=",hwaddr=$MAC1" + echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + fi else - MAC=",hwaddr=$MAC1" - echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}" + exit-script fi -else - exit-script -fi -if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then - if [ -z $VLAN1 ]; then - VLAN1="Default" - VLAN="" + if VLAN1=$(whiptail --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + else + VLAN=",tag=$VLAN1" + fi + echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" else - VLAN=",tag=$VLAN1" + exit-script fi - echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}" -else - exit-script -fi -if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then - SSH="yes" -else - SSH="no" -fi + if (whiptail --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then + SSH="yes" + else + SSH="no" + fi echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}" -if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then - VERB="yes" -else - VERB="no" -fi + if (whiptail --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then + VERB="yes" + else + VERB="no" + fi echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}" -if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then - echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" -else - clear - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings -fi + if (whiptail --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then + echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}" + else + clear + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function install_script() { -ARCH_CHECK -PVE_CHECK -NEXTID=$(pvesh get /cluster/nextid) -header_info - if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + ARCH_CHECK + PVE_CHECK + NEXTID=$(pvesh get /cluster/nextid) header_info - echo -e "${BL}Using Default Settings${CL}" - default_settings - else - header_info - echo -e "${RD}Using Advanced Settings${CL}" - advanced_settings - fi + if (whiptail --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi } function update_script() { -header_info -msg_info "Updating ${APP} LXC" -pacman-key --init -pacman-key --populate archlinux -pacman -Sy archlinux-keyring && pacman -Su -msg_ok "Updated Successfully" -exit + header_info + msg_info "Updating ${APP} LXC" + pacman-key --init + pacman-key --populate archlinux + pacman -Sy archlinux-keyring && pacman -Su + msg_ok "Updated Successfully" + exit } 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 + 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; 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 + 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 [ "$CT_TYPE" == "1" ]; then - FEATURES="nesting=1,keyctl=1" + FEATURES="nesting=1,keyctl=1" else - FEATURES="nesting=1" + FEATURES="nesting=1" fi TEMP_DIR=$(mktemp -d) -pushd $TEMP_DIR >/dev/null +pushd $TEMP_DIR >/dev/null export tz=$timezone export DISABLEIPV6=$DISABLEIP6 export APPLICATION=$APP diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 8c1de6f2..f1c0d2fa 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ __ __ __ ______ ____ ___ ______/ (_)___ / /_ ____ ____ / /_______/ /_ ___ / / __/ / __ `/ / / / __ / / __ \/ __ \/ __ \/ __ \/ //_/ ___/ __ \/ _ \/ / /_ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/autobrr.sh b/ct/autobrr.sh index c3f79c42..0a5c15e5 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ __ __ / | __ __/ /_____ / /_ __________ / /| |/ / / / __/ __ \/ __ \/ ___/ ___/ @@ -51,24 +51,27 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /root/.config/autobrr/config.toml ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ${APP} LXC" -systemctl stop autobrr.service -msg_ok "Stopped ${APP} LXC" + header_info + if [[ ! -f /root/.config/autobrr/config.toml ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping ${APP} LXC" + systemctl stop autobrr.service + msg_ok "Stopped ${APP} LXC" -msg_info "Updating ${APP} LXC" -rm -rf /usr/local/bin/* -wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) -tar -C /usr/local/bin -xzf autobrr*.tar.gz -rm -rf autobrr*.tar.gz -msg_ok "Updated ${APP} LXC" + msg_info "Updating ${APP} LXC" + rm -rf /usr/local/bin/* + wget -q $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) + tar -C /usr/local/bin -xzf autobrr*.tar.gz + rm -rf autobrr*.tar.gz + msg_ok "Updated ${APP} LXC" -msg_info "Starting ${APP} LXC" -systemctl start autobrr.service -msg_ok "Started ${APP} LXC" -msg_ok "Updated Successfully" -exit + msg_info "Starting ${APP} LXC" + systemctl start autobrr.service + msg_ok "Started ${APP} LXC" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/bazarr.sh b/ct/bazarr.sh index be9cc53a..5ffadd10 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ / __ )____ _____ ____ ___________ / __ / __ `/_ / / __ `/ ___/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var/lib/bazarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var/lib/bazarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/blocky.sh b/ct/blocky.sh index 049f979d..841614f2 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ __ / __ )/ /___ _____/ /____ __ / __ / / __ \/ ___/ //_/ / / / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/casaos.sh b/ct/casaos.sh index 52e9f880..504c1738 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ ____ _____ / ____/___ __________ _/ __ \/ ___/ / / / __ `/ ___/ __ `/ / / /\__ \ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 8f938dd5..ca32cf7b 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ ____ __ __ _ / ____/ /_ ____ _____ ____ ____ / __ \___ / /____ _____/ /_(_)___ ____ / / / __ \/ __ `/ __ \/ __ `/ _ \ / / / / _ \/ __/ _ \/ ___/ __/ / __ \/ __ \ @@ -51,12 +51,15 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -pip3 install changedetection.io --upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/changedetection.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + pip3 install changedetection.io --upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index 59634450..94d8c8d2 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ ________ __ / ____/ /___ __ ______/ / __/ /___ _________ ____/ / / / / / __ \/ / / / __ / /_/ / __ `/ ___/ _ \/ __ / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 4cf41103..328c8afd 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -79,7 +79,7 @@ function select_storage() { ;; *) false || exit "Invalid storage class." ;; esac - + # This Queries all storage locations local -a MENU while read -r line; do @@ -93,7 +93,7 @@ function select_storage() { fi MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') - + # Select storage location if [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} diff --git a/ct/cronicle.sh b/ct/cronicle.sh index f5227c32..2de83003 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ _ __ / ____/________ ____ (_)____/ /__ / / / ___/ __ \/ __ \/ / ___/ / _ \ @@ -51,53 +51,56 @@ function default_settings() { } function update_script() { -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update ${APP}" ON \ - "2" "Install ${APP} Worker" OFF \ - 3>&1 1>&2 2>&3) + UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update ${APP}" ON \ + "2" "Install ${APP} Worker" OFF \ + 3>&1 1>&2 2>&3) -if [ "$UPD" == "1" ]; then -header_info -if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -/opt/cronicle/bin/control.sh upgrade &>/dev/null -msg_ok "Updated ${APP}" -exit -fi -if [ "$UPD" == "2" ]; then -LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing Dependencies" + if [ "$UPD" == "1" ]; then + header_info + if [[ ! -d /opt/cronicle ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + /opt/cronicle/bin/control.sh upgrade &>/dev/null + msg_ok "Updated ${APP}" + exit + fi + if [ "$UPD" == "2" ]; then + LATEST=$(curl -sL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + IP=$(hostname -I | awk '{print $1}') + msg_info "Installing Dependencies" -apt-get install -y git &>/dev/null -apt-get install -y make &>/dev/null -apt-get install -y g++ &>/dev/null -apt-get install -y gcc &>/dev/null -msg_ok "Installed Dependencies" + apt-get install -y git &>/dev/null + apt-get install -y make &>/dev/null + apt-get install -y g++ &>/dev/null + apt-get install -y gcc &>/dev/null + msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) &>/dev/null -msg_ok "Set up Node.js Repository" + msg_info "Setting up Node.js Repository" + bash <(curl -fsSL https://deb.nodesource.com/setup_16.x) &>/dev/null + msg_ok "Set up Node.js Repository" -msg_info "Installing Node.js" -apt-get install -y nodejs &>/dev/null -msg_ok "Installed Node.js" + msg_info "Installing Node.js" + apt-get install -y nodejs &>/dev/null + msg_ok "Installed Node.js" -msg_info "Installing Cronicle Worker" -mkdir -p /opt/cronicle -cd /opt/cronicle -tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 &>/dev/null -npm install &>/dev/null -node bin/build.js dist &>/dev/null -sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json -/opt/cronicle/bin/control.sh start &>/dev/null -cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled &>/dev/null -chmod 775 /etc/init.d/cronicled -update-rc.d cronicled defaults &>/dev/null -msg_ok "Installed Cronicle Worker" -echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" -exit -fi + msg_info "Installing Cronicle Worker" + mkdir -p /opt/cronicle + cd /opt/cronicle + tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 &>/dev/null + npm install &>/dev/null + node bin/build.js dist &>/dev/null + sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json + /opt/cronicle/bin/control.sh start &>/dev/null + cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled &>/dev/null + chmod 775 /etc/init.d/cronicled + update-rc.d cronicled defaults &>/dev/null + msg_ok "Installed Cronicle Worker" + echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" + exit + fi } start diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index c134ce41..c1d3cf0b 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ _____ / __ \____ ____ ____ ___ ____ ____ / ___/__ ______ _____ / / / / __ / _ \/ __ __ \/ __ \/ __ \ \__ \/ / / / __ \/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/dashy.sh b/ct/dashy.sh index 64016d38..ea07a094 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \____ ______/ /_ __ __ / / / / __ / ___/ __ \/ / / / @@ -51,39 +51,42 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /dashy/public/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ${APP}" -systemctl stop dashy -msg_ok "Stopped ${APP}" + header_info + if [[ ! -d /dashy/public/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping ${APP}" + systemctl stop dashy + msg_ok "Stopped ${APP}" -msg_info "Backing up conf.yml" -cd ~ -cp -R /dashy/public/conf.yml conf.yml -msg_ok "Backed up conf.yml" + msg_info "Backing up conf.yml" + cd ~ + cp -R /dashy/public/conf.yml conf.yml + msg_ok "Backed up conf.yml" -msg_info "Updating Dashy" -cd /dashy -git merge &>/dev/null -git pull origin master &>/dev/null -yarn &>/dev/null -yarn build &>/dev/null -msg_ok "Updated Dashy" + msg_info "Updating Dashy" + cd /dashy + git merge &>/dev/null + git pull origin master &>/dev/null + yarn &>/dev/null + yarn build &>/dev/null + msg_ok "Updated Dashy" -msg_info "Restoring conf.yml" -cd ~ -cp -R conf.yml /dashy/public -msg_ok "Restored conf.yml" + msg_info "Restoring conf.yml" + cd ~ + cp -R conf.yml /dashy/public + msg_ok "Restored conf.yml" -msg_info "Cleaning" -rm -rf conf.yml -msg_ok "Cleaned" + msg_info "Cleaning" + rm -rf conf.yml + msg_ok "Cleaned" -msg_info "Starting Dashy" -systemctl start dashy -msg_ok "Started Dashy" -msg_ok "Updated Successfully" -exit + msg_info "Starting Dashy" + systemctl start dashy + msg_ok "Started Dashy" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/debian.sh b/ct/debian.sh index f684369d..ee008a48 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ _ / __ \___ / /_ (_)___ _____ / / / / _ \/ __ \/ / __ `/ __ \ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/deconz.sh b/ct/deconz.sh index 2c59fa20..adc6ce25 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __________ _ _______ ____/ /__ / ____/ __ \/ | / /__ / / __ / _ \/ / / / / / |/ / / / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/deluge.sh b/ct/deluge.sh index 163fe125..eb3c5214 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \___ / /_ ______ ____ / / / / _ \/ / / / / __ `/ _ \ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/deluged.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -pip3 install deluge[all] --upgrade -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -f /etc/systemd/system/deluged.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + pip3 install deluge[all] --upgrade + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/devuan.sh b/ct/devuan.sh index 25bdc96f..11f489ed 100644 --- a/ct/devuan.sh +++ b/ct/devuan.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ / __ \___ _ ____ ______ ____ / / / / _ \ | / / / / / __ `/ __ \ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/docker.sh b/ct/docker.sh index db176aec..d2667c0e 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \____ _____/ /_ __ _____ / / / / __ \/ ___/ //_/ _ \/ ___/ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/emby.sh b/ct/emby.sh index 1491a55c..c9c60ae2 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ __ / ____/___ ___ / /_ __ __ / __/ / __ __ \/ __ \/ / / / @@ -51,24 +51,27 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/emby-server ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -msg_info "Stopping ${APP}" -systemctl stop emby-server -msg_ok "Stopped ${APP}" + header_info + if [[ ! -d /opt/emby-server ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + msg_info "Stopping ${APP}" + systemctl stop emby-server + msg_ok "Stopped ${APP}" -msg_info "Updating ${APP}" -wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null -dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null -rm emby-server-deb_${LATEST}_amd64.deb -msg_ok "Updated ${APP}" + msg_info "Updating ${APP}" + wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null + dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null + rm emby-server-deb_${LATEST}_amd64.deb + msg_ok "Updated ${APP}" -msg_info "Starting ${APP}" -systemctl start emby-server -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" -exit + msg_info "Starting ${APP}" + systemctl start emby-server + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/emqx.sh b/ct/emqx.sh index fb198fce..20b1cb3f 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ _______ _ __ / ____/ |/ / __ \ | |/ / / __/ / /|_/ / / / / | / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/esphome.sh b/ct/esphome.sh index a752b0d3..02e472d9 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___________ ____ __ __ / ____/ ___// __ \/ / / /___ ____ ___ ___ / __/ \__ \/ /_/ / /_/ / __ \/ __ `__ \/ _ \ @@ -51,24 +51,27 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ESPHome" -systemctl stop esphomeDashboard -msg_ok "Stopped ESPHome" + header_info + if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping ESPHome" + systemctl stop esphomeDashboard + msg_ok "Stopped ESPHome" -msg_info "Updating ESPHome" -if [[ -d /srv/esphome ]]; then - source /srv/esphome/bin/activate &>/dev/null -fi -pip3 install -U esphome &>/dev/null -msg_ok "Updated ESPHome" + msg_info "Updating ESPHome" + if [[ -d /srv/esphome ]]; then + source /srv/esphome/bin/activate &>/dev/null + fi + pip3 install -U esphome &>/dev/null + msg_ok "Updated ESPHome" -msg_info "Starting ESPHome" -systemctl start esphomeDashboard -msg_ok "Started ESPHome" -msg_ok "Updated Successfully" -exit + msg_info "Starting ESPHome" + systemctl start esphomeDashboard + msg_ok "Started ESPHome" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/fhem.sh b/ct/fhem.sh index 7f9c8ecf..9bcf1d94 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ / ____/ /_ ___ ____ ___ / /_ / __ \/ _ \/ __ `__ \ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/fhem.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/fhem.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 89c7405b..f5e969f7 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ __ ____ _____ |__ \ _____/ /______ / __ `/ __ \__/ // ___/ __/ ___/ @@ -52,17 +52,20 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/go2rtc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP" -systemctl stop go2rtc -cd /opt/go2rtc -rm go2rtc_linux_amd64 -wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 -chmod +x go2rtc_linux_amd64 -systemctl start go2rtc -msg_ok "Updated $APP" -exit + header_info + if [[ ! -d /opt/go2rtc ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP" + systemctl stop go2rtc + cd /opt/go2rtc + rm go2rtc_linux_amd64 + wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 + chmod +x go2rtc_linux_amd64 + systemctl start go2rtc + msg_ok "Updated $APP" + exit } start diff --git a/ct/grafana.sh b/ct/grafana.sh index bb50c557..0b55f629 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ ____ / ____/________ _/ __/___ _____ ____ _ / / __/ ___/ __ / /_/ __ / __ \/ __ / @@ -51,16 +51,19 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -apt-key del 4E40DDF6D76E284A4A6780E48C8C34C524098CB6 -wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key -echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + apt-key del 4E40DDF6D76E284A4A6780E48C8C34C524098CB6 + wget -q -O /usr/share/keyrings/grafana.key https://apt.grafana.com/gpg.key + echo "deb [signed-by=/usr/share/keyrings/grafana.key] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/grocy.sh b/ct/grocy.sh index 020971cb..63ddd380 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __________ _______ __ / __ / ___/ __ \/ ___/ / / / / /_/ / / / /_/ / /__/ /_/ / @@ -51,12 +51,15 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -bash /var/www/html/update.sh -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + bash /var/www/html/update.sh + msg_ok "Updated Successfully" + exit } start diff --git a/ct/heimdalldashboard.sh b/ct/heimdalldashboard.sh index 1a2b701a..eec128b7 100644 --- a/ct/heimdalldashboard.sh +++ b/ct/heimdalldashboard.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ _ _ _ ___ _ _ _ /\ /\___(_)_ __ ___ __| | __ _| | | / \__ _ ___| |__ | |__ ___ __ _ _ __ __| | / /_/ / _ \ | '_ ` _ \ / _` |/ _` | | | / /\ / _` / __| '_ \| '_ \ / _ \ / _` | '__/ _` | @@ -51,47 +51,50 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ${APP}" -systemctl disable heimdall.service &>/dev/null -systemctl stop heimdall -sleep 1 -msg_ok "Stopped ${APP}" + header_info + if [[ ! -d /opt/Heimdall ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping ${APP}" + systemctl disable heimdall.service &>/dev/null + systemctl stop heimdall + sleep 1 + msg_ok "Stopped ${APP}" -msg_info "Backing up Data" -if [ -d "/opt/Heimdall-2.4.6" ]; then - cp -R /opt/Heimdall-2.4.6/database database-backup - cp -R /opt/Heimdall-2.4.6/public public-backup -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - cp -R /opt/Heimdall-2.4.7b/database database-backup - cp -R /opt/Heimdall-2.4.7b/public public-backup -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - cp -R /opt/Heimdall-2.4.8/database database-backup - cp -R /opt/Heimdall-2.4.8/public public-backup -else - cp -R /opt/Heimdall/database database-backup - cp -R /opt/Heimdall/public public-backup -fi -sleep 1 -msg_ok "Backed up Data" + msg_info "Backing up Data" + if [ -d "/opt/Heimdall-2.4.6" ]; then + cp -R /opt/Heimdall-2.4.6/database database-backup + cp -R /opt/Heimdall-2.4.6/public public-backup + elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then + cp -R /opt/Heimdall-2.4.7b/database database-backup + cp -R /opt/Heimdall-2.4.7b/public public-backup + elif [[ -d "/opt/Heimdall-2.4.8" ]]; then + cp -R /opt/Heimdall-2.4.8/database database-backup + cp -R /opt/Heimdall-2.4.8/public public-backup + else + cp -R /opt/Heimdall/database database-backup + cp -R /opt/Heimdall/public public-backup + fi + sleep 1 + msg_ok "Backed up Data" -RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -msg_info "Updating Heimdall Dashboard to ${RELEASE}" -curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null -tar xvzf ${RELEASE}.tar.gz &>/dev/null -VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | - grep "tag_name" | - awk '{print substr($2, 3, length($2)-4) }') + RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') + msg_info "Updating Heimdall Dashboard to ${RELEASE}" + curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null + tar xvzf ${RELEASE}.tar.gz &>/dev/null + VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | + grep "tag_name" | + awk '{print substr($2, 3, length($2)-4) }') -if [ ! -d "/opt/Heimdall" ]; then - mv Heimdall-${VER} /opt/Heimdall -else - cp -R Heimdall-${VER}/* /opt/Heimdall -fi + if [ ! -d "/opt/Heimdall" ]; then + mv Heimdall-${VER} /opt/Heimdall + else + cp -R Heimdall-${VER}/* /opt/Heimdall + fi -service_path="/etc/systemd/system/heimdall.service" -echo "[Unit] + service_path="/etc/systemd/system/heimdall.service" + echo "[Unit] Description=Heimdall After=network.target [Service] @@ -104,40 +107,40 @@ ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0 TimeoutStopSec=30 [Install] WantedBy=multi-user.target" >$service_path -msg_ok "Updated Heimdall Dashboard to ${RELEASE}" + msg_ok "Updated Heimdall Dashboard to ${RELEASE}" -msg_info "Restoring Data" -cp -R database-backup/* /opt/Heimdall/database -cp -R public-backup/* /opt/Heimdall/public -sleep 1 -msg_ok "Restored Data" + msg_info "Restoring Data" + cp -R database-backup/* /opt/Heimdall/database + cp -R public-backup/* /opt/Heimdall/public + sleep 1 + msg_ok "Restored Data" -msg_info "Cleanup" -if [ -d "/opt/Heimdall-2.4.6" ]; then - rm -rf /opt/Heimdall-2.4.6 - rm -rf /opt/v2.4.6.tar.gz -elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then - rm -rf /opt/Heimdall-2.4.7b - rm -rf /opt/v2.4.7b.tar.gz -elif [[ -d "/opt/Heimdall-2.4.8" ]]; then - rm -rf /opt/Heimdall-2.4.8 - rm -rf /opt/v2.4.8.tar.gz -fi + msg_info "Cleanup" + if [ -d "/opt/Heimdall-2.4.6" ]; then + rm -rf /opt/Heimdall-2.4.6 + rm -rf /opt/v2.4.6.tar.gz + elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then + rm -rf /opt/Heimdall-2.4.7b + rm -rf /opt/v2.4.7b.tar.gz + elif [[ -d "/opt/Heimdall-2.4.8" ]]; then + rm -rf /opt/Heimdall-2.4.8 + rm -rf /opt/v2.4.8.tar.gz + fi -rm -rf ${RELEASE}.tar.gz -rm -rf Heimdall-${VER} -rm -rf public-backup -rm -rf database-backup -rm -rf Heimdall -sleep 1 -msg_ok "Cleaned" + rm -rf ${RELEASE}.tar.gz + rm -rf Heimdall-${VER} + rm -rf public-backup + rm -rf database-backup + rm -rf Heimdall + sleep 1 + msg_ok "Cleaned" -msg_info "Starting ${APP}" -systemctl enable --now heimdall.service &>/dev/null -sleep 2 -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" -exit + msg_info "Starting ${APP}" + systemctl enable --now heimdall.service &>/dev/null + sleep 2 + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 7522a7f4..2c03434a 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ______ __ _____________ ____ ________ ____________ / / / / __ \/ |/ / ____/ __ )/ __ \/ _/ __ \/ ____/ ____/ / /_/ / / / / /|_/ / __/ / __ / /_/ // // / / / / __/ __/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/homebridge.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get install -y homebridge &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/homebridge.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get install -y homebridge &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/homepage.sh b/ct/homepage.sh index eba11d3c..ae0fa7e1 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ / / / /___ ____ ___ ___ ____ ____ _____ ____ / /_/ / __ \/ __ `__ \/ _ \/ __ \/ __ `/ __ `/ _ \ @@ -51,20 +51,23 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/homepage ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -if ! command -v pnpm >/dev/null 2>&1; then + header_info + if [[ ! -d /opt/homepage ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + if ! command -v pnpm >/dev/null 2>&1; then npm install -g pnpm &>/dev/null -fi -cd /opt/homepage -systemctl stop homepage -git pull --force &>/dev/null -pnpm install &>/dev/null -pnpm build &>/dev/null -systemctl start homepage -msg_ok "Updated Successfully" -exit + fi + cd /opt/homepage + systemctl stop homepage + git pull --force &>/dev/null + pnpm install &>/dev/null + pnpm build &>/dev/null + systemctl start homepage + msg_ok "Updated Successfully" + exit } start diff --git a/ct/homer.sh b/ct/homer.sh index fcdc17ac..d8c28469 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ / / / /___ ____ ___ ___ _____ / /_/ / __ \/ __ `__ \/ _ \/ ___/ @@ -51,37 +51,40 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/homer ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ${APP}" -systemctl stop homer -msg_ok "Stopped ${APP}" + header_info + if [[ ! -d /opt/homer ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping ${APP}" + systemctl stop homer + msg_ok "Stopped ${APP}" -msg_info "Backing up config.yml" -cd ~ -cp -R /opt/homer/assets/config.yml config.yml -msg_ok "Backed up config.yml" + msg_info "Backing up config.yml" + cd ~ + cp -R /opt/homer/assets/config.yml config.yml + msg_ok "Backed up config.yml" -msg_info "Updating ${APP}" -rm -rf /opt/homer/* -cd /opt/homer -wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip -unzip homer.zip &>/dev/null -msg_ok "Updated ${APP}" -msg_info "Restoring conf.yml" -cd ~ -cp -R config.yml /opt/homer/assets -msg_ok "Restored conf.yml" + msg_info "Updating ${APP}" + rm -rf /opt/homer/* + cd /opt/homer + wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip + unzip homer.zip &>/dev/null + msg_ok "Updated ${APP}" + msg_info "Restoring conf.yml" + cd ~ + cp -R config.yml /opt/homer/assets + msg_ok "Restored conf.yml" -msg_info "Cleaning" -rm -rf config.yml /opt/homer/homer.zip -msg_ok "Cleaned" + msg_info "Cleaning" + rm -rf config.yml /opt/homer/homer.zip + msg_ok "Cleaned" -msg_info "Starting ${APP}" -systemctl start homer -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" -exit + msg_info "Starting ${APP}" + systemctl start homer + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/hyperion.sh b/ct/hyperion.sh index fbd17687..3978edbc 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ _ / / / /_ ______ ___ _____(_)___ ____ / /_/ / / / / __ \/ _ \/ ___/ / __ \/ __ \ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get install -y hyperion &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get install -y hyperion &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 3c7bda46..893389f4 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ ______ ____ ____ / _/___ / __/ /_ ___ __/ __ \/ __ ) / // __ \/ /_/ / / / / |/_/ / / / __ | @@ -51,17 +51,20 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/influxdb.list || ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -wget -q https://repos.influxdata.com/influxdata-archive_compat.key -cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null -echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | tee /etc/apt/sources.list.d/influxdata.list -rm -f /etc/apt/trusted.gpg.d/influxdb.gpg -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/influxdb.list || ! -f /etc/apt/sources.list.d/influxdata.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + wget -q https://repos.influxdata.com/influxdata-archive_compat.key + cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg >/dev/null + echo 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main' | tee /etc/apt/sources.list.d/influxdata.list + rm -f /etc/apt/trusted.gpg.d/influxdb.gpg + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 8feef540..db7c8088 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ ____ __ (_)___ / __ )_________ / /_____ _____ / / __ \/ __ / ___/ __ \/ //_/ _ \/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/iobroker ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -d /opt/iobroker ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/jackett.sh b/ct/jackett.sh index 892e2da2..1879b45b 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ __ __ / /___ ______/ /_____ / /_/ /_ __ / / __ `/ ___/ //_/ _ \/ __/ __/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/jackett.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + if [[ ! -f /etc/systemd/system/jackett.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 5c8018fd..0827d9d0 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ____ _____ / /__ / / /_ __/ __(_)___ __ / / _ \/ / / / / / /_/ / __ \ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /usr/lib/jellyfin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + if [[ ! -d /usr/lib/jellyfin ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/k0s.sh b/ct/k0s.sh index 0591912e..a6e1c2fd 100644 --- a/ct/k0s.sh +++ b/ct/k0s.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ____ __ __ __ __ / /__/ __ \_____ / //_/_ __/ /_ ___ _________ ___ / /____ _____ / //_/ / / / ___/ / ,< / / / / __ \/ _ \/ ___/ __ \/ _ \/ __/ _ \/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/k0s/k0s.yaml ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/k0s/k0s.yaml ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/kavita.sh b/ct/kavita.sh index 4d86cd74..7971c185 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ _ __ / //_/___ __ __(_) /_____ _ / ,< / __ `/ | / / / __/ __ `/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/Kavita ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /opt/Kavita ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 5d9215b8..41203b14 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ __ __ / //_/__ __ _______/ /___ ____ _/ /__ / ,< / _ \/ / / / ___/ / __ \/ __ / //_/ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/keycloak.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/keycloak.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 9f2bbb5d..d0d6d3af 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ _ __ / / (_)___/ /___ __________ / / / / __ / __ `/ ___/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var/lib/lidarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var/lib/lidarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index c3078bc3..276caf8c 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ___ _ __ ____ / |/ /___ _____ _(_)____/ |/ (_)_____________ _____ / /|_/ / __ / __ / / ___/ /|_/ / / ___/ ___/ __ \/ ___/ @@ -52,14 +52,17 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/magicmirror ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -cd /opt/magicmirror -git pull &>/dev/null -npm install --only=prod --omit=dev &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -d /opt/magicmirror ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + cd /opt/magicmirror + git pull &>/dev/null + npm install --only=prod --omit=dev &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/mariadb.sh b/ct/mariadb.sh index dcf59e0d..192a3918 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ___ _ ____ ____ / |/ /___ ______(_)___ _/ __ \/ __ ) / /|_/ / __ / ___/ / __ / / / / __ | @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 03b3efd2..02e0c53d 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ___ __ ______ __ __ / |/ /__ _____/ /_ / ____/__ ____ / /__________ _/ / / /|_/ / _ \/ ___/ __ \/ / / _ \/ __ \/ __/ ___/ __ / / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/meshcentral ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -d /opt/meshcentral ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 8ec8f6a2..03198003 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ___ __ _ / |/ /___ / /_(_)___ ____ ___ __ _____ / /|_/ / __ \/ __/ / __ \/ __ \/ _ \/ / / / _ \ @@ -51,12 +51,15 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/motioneye.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -pip install motioneye --upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/motioneye.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + pip install motioneye --upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 79273287..b8e534ab 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ___ ____ _ ____________ / |/ /___ _____/ __ \__ __(_)_ __/_ __/___ / /|_/ / __ \/ ___/ / / / / / / / / / / / / __ \ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/mosquitto-bullseye.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/n8n.sh b/ct/n8n.sh index fbf697a8..fca3682e 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ___ / _ \ _ __ | (_) |____ @@ -52,12 +52,15 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/n8n.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -npm update -g n8n &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/n8n.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + npm update -g n8n &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 258c0acd..4445ae8b 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ __ _ __ / | / /___ __ __(_)___/ /________ ____ ___ ___ / |/ / __ / | / / / __ / ___/ __ \/ __ __ \/ _ \ @@ -51,24 +51,27 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/navidrome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Stopping ${APP}" -systemctl stop navidrome.service -msg_ok "Stopped Navidrome" + header_info + if [[ ! -d /opt/navidrome ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + msg_info "Stopping ${APP}" + systemctl stop navidrome.service + msg_ok "Stopped Navidrome" -msg_info "Updating to v${RELEASE}" -wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null -tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null -msg_ok "Updated ${APP}" -rm Navidrome.tar.gz + msg_info "Updating to v${RELEASE}" + wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_Linux_x86_64.tar.gz -O Navidrome.tar.gz &>/dev/null + tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null + msg_ok "Updated ${APP}" + rm Navidrome.tar.gz -msg_info "${GN} Starting ${APP}" -systemctl start navidrome.service -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" -exit + msg_info "${GN} Starting ${APP}" + systemctl start navidrome.service + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 1b63695c..39dc9179 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ __ __ ________ ______ _ / | / /__ _ __/ /_/ ____/ /___ __ ______/ / __ \(_) / |/ / _ \| |/_/ __/ / / / __ \/ / / / __ / /_/ / / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/nocodb.sh b/ct/nocodb.sh index 3c400a1e..f525f346 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ __ ____ ____ / | / /___ ____ ___ / __ \/ __ ) / |/ / __ \/ ___/ __ \/ / / / __ | @@ -51,15 +51,18 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -cd /opt/nocodb -npm uninstall -s --save nocodb &>/dev/null -npm install -s --save nocodb &>/dev/null -systemctl restart nocodb.service -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/nocodb.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + cd /opt/nocodb + npm uninstall -s --save nocodb &>/dev/null + npm install -s --save nocodb &>/dev/null + systemctl restart nocodb.service + msg_ok "Updated Successfully" + exit } start diff --git a/ct/node-red.sh b/ct/node-red.sh index f95388a1..da06ca7b 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ __ __ ____ __ / | / /___ ____/ /__ / __ \___ ____/ / / |/ / __ \/ __ / _ \ / /_/ / _ \/ __ / @@ -51,49 +51,52 @@ function default_settings() { } function update_script() { -if [[ ! -d /root/.node-red ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update ${APP}" ON \ - "2" "Install Themes" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Stopping ${APP}" -systemctl stop nodered -msg_ok "Stopped ${APP}" + if [[ ! -d /root/.node-red ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update ${APP}" ON \ + "2" "Install Themes" OFF \ + 3>&1 1>&2 2>&3) + header_info + if [ "$UPD" == "1" ]; then + msg_info "Stopping ${APP}" + systemctl stop nodered + msg_ok "Stopped ${APP}" -msg_info "Updating ${APP}" -npm install -g --unsafe-perm node-red &>/dev/null -msg_ok "Updated ${APP}" + msg_info "Updating ${APP}" + npm install -g --unsafe-perm node-red &>/dev/null + msg_ok "Updated ${APP}" -msg_info "Starting ${APP}" -systemctl start nodered -msg_ok "Started ${APP}" -msg_ok "Update Successful" -exit -fi -if [ "$UPD" == "2" ]; then -THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ - "dark" "" OFF \ - "dracula" "" OFF \ - "midnight-red" "" ON \ - "oled" "" OFF \ - "solarized-dark" "" OFF \ - "solarized-light" "" OFF \ - 3>&1 1>&2 2>&3) -header_info -msg_info "Installing ${THEME} Theme" -cd /root/.node-red -sed -i 's|//theme: "",|theme: "",|g' /root/.node-red/settings.js -npm install @node-red-contrib-themes/${THEME} &>/dev/null -sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js -msg_ok "Installed ${THEME} Theme" + msg_info "Starting ${APP}" + systemctl start nodered + msg_ok "Started ${APP}" + msg_ok "Update Successful" + exit + fi + if [ "$UPD" == "2" ]; then + THEME=$(whiptail --title "NODE-RED THEMES" --radiolist --cancel-button Exit-Script "Choose Theme" 15 58 6 \ + "dark" "" OFF \ + "dracula" "" OFF \ + "midnight-red" "" ON \ + "oled" "" OFF \ + "solarized-dark" "" OFF \ + "solarized-light" "" OFF \ + 3>&1 1>&2 2>&3) + header_info + msg_info "Installing ${THEME} Theme" + cd /root/.node-red + sed -i 's|//theme: "",|theme: "",|g' /root/.node-red/settings.js + npm install @node-red-contrib-themes/${THEME} &>/dev/null + sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js + msg_ok "Installed ${THEME} Theme" -msg_info "Restarting ${APP}" -systemctl restart nodered -msg_ok "Restarted ${APP}" -exit -fi + msg_info "Restarting ${APP}" + systemctl restart nodered + msg_ok "Restarted ${APP}" + exit + fi } start diff --git a/ct/octoprint.sh b/ct/octoprint.sh index 3d4cb3e0..a573849b 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ ____ _ __ / __ \_____/ /_____ / __ \_____(_)___ / /_ / / / / ___/ __/ __ \/ /_/ / ___/ / __ \/ __/ @@ -51,22 +51,25 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/octoprint ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping OctoPrint" -systemctl stop octoprint -msg_ok "Stopped OctoPrint" + header_info + if [[ ! -d /opt/octoprint ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping OctoPrint" + systemctl stop octoprint + msg_ok "Stopped OctoPrint" -msg_info "Updating OctoPrint" -source /opt/octoprint/bin/activate -pip3 install octoprint --upgrade &>/dev/null -msg_ok "Updated OctoPrint" + msg_info "Updating OctoPrint" + source /opt/octoprint/bin/activate + pip3 install octoprint --upgrade &>/dev/null + msg_ok "Updated OctoPrint" -msg_info "Starting OctoPrint" -systemctl start octoprint -msg_ok "Started OctoPrint" -msg_ok "Updated Successfully" -exit + msg_info "Starting OctoPrint" + systemctl start octoprint + msg_ok "Started OctoPrint" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/omada.sh b/ct/omada.sh index f8d485aa..63de2030 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \____ ___ ____ _____/ /___ _ / / / / __ __ \/ __ / __ / __ / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -d /opt/tplink ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/ombi.sh b/ct/ombi.sh index 156d7507..eacccd96 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ _ / __ \____ ___ / /_ (_) / / / / __ `__ \/ __ \/ / @@ -51,10 +51,13 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/ombi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." -exit + header_info + if [[ ! -d /opt/ombi ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "There is currently no update path available." + exit } start diff --git a/ct/omv.sh b/ct/omv.sh index 063bc49b..18d25857 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ ___ ___ _ __ ____ / __ \____ ___ ____ / |/ /__ ____/ (_)___ | | / /___ ___ __/ / /_ / / / / __ \/ _ \/ __ \/ /|_/ / _ \/ __ / / __ `/ | / / __ `/ / / / / __/ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/openhab.sh b/ct/openhab.sh index 7841d610..7c2f9640 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ _____ ____ ____ ____ ___ ____ / / / / | / __ ) / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ | @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/openobserve.sh b/ct/openobserve.sh index 7cdd431e..1a0dbb03 100644 --- a/ct/openobserve.sh +++ b/ct/openobserve.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ ____ __ / __ \____ ___ ____ / __ \/ /_ ________ ______ _____ @@ -53,15 +53,18 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/openobserve/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP" -systemctl stop openobsecure -LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve -systemctl start openobsecure -msg_ok "Updated $APP" -exit + header_info + if [[ ! -d /opt/openobserve/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP" + systemctl stop openobsecure + LATEST=$(curl -sL https://api.github.com/repos/openobserve/openobserve/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + tar zxvf <(curl -fsSL https://github.com/openobserve/openobserve/releases/download/$LATEST/openobserve-${LATEST}-linux-amd64.tar.gz) -C /opt/openobserve + systemctl start openobsecure + msg_ok "Updated $APP" + exit } start diff --git a/ct/pihole.sh b/ct/pihole.sh index 9417013d..acbe7ba6 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ ____ __ ______ __ ______ / __ \/ _/ / / / / __ \/ / / ____/ / /_/ // /___/ /_/ / / / / / / __/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /etc/pihole ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -d /etc/pihole ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/plex.sh b/ct/plex.sh index ac09683a..d78e2b58 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ __ ___ ___ _____ / __ \/ /__ _ __ / |/ /__ ____/ (_)___ _ / ___/___ ______ _____ _____ / /_/ / / _ \| |/_/ / /|_/ / _ \/ __ / / __ `/ \__ \/ _ \/ ___/ | / / _ \/ ___/ @@ -51,25 +51,28 @@ function default_settings() { } function update_script() { -if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ - "1" "Update LXC" ON \ - "2" "Install plexupdate" OFF \ - 3>&1 1>&2 2>&3) + if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ + "1" "Update LXC" ON \ + "2" "Install plexupdate" OFF \ + 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit -fi -if [ "$UPD" == "2" ]; then -set +e -bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)" -exit -fi + header_info + if [ "$UPD" == "1" ]; then + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit + fi + if [ "$UPD" == "2" ]; then + set +e + bash -c "$(wget -qO - https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)" + exit + fi } start diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index a1c8c4fc..86539328 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \____ ____/ /___ ___ ____ _____ / /_/ / __ \/ __ / __ __ \/ __ / __ \ @@ -55,57 +55,60 @@ function default_settings() { } function update_script() { - if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ - "1" "Update system and containers" ON \ - "2" "Install HACS" OFF \ - "3" "Install FileBrowser" OFF \ - "4" "Remove ALL Unused Images" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then - msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null - msg_ok "Updated Successfully" + "1" "Update system and containers" ON \ + "2" "Install HACS" OFF \ + "3" "Install FileBrowser" OFF \ + "4" "Remove ALL Unused Images" OFF \ + 3>&1 1>&2 2>&3) + header_info + if [ "$UPD" == "1" ]; then + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" - msg_info "Updating All Containers\n" - CONTAINER_LIST="${1:-$(podman ps -q)}" - for container in ${CONTAINER_LIST}; do - CONTAINER_IMAGE="$(podman inspect --format "{{.Config.Image}}" --type container ${container})" - RUNNING_IMAGE="$(podman inspect --format "{{.Image}}" --type container "${container}")" - podman pull "docker.io/${CONTAINER_IMAGE}" - LATEST_IMAGE="$(podman inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" - if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then - echo "Updating ${container} image ${CONTAINER_IMAGE}" - systemctl restart homeassistant - fi - done - msg_ok "All containers updated." - exit -fi -if [ "$UPD" == "2" ]; then - msg_info "Installing Home Assistant Comunity Store (HACS)" - apt update &>/dev/null - apt install unzip &>/dev/null - cd /var/lib/containers/storage/volumes/hass_config/_data - bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null - msg_ok "Installed Home Assistant Comunity Store (HACS)" - echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" - exit -fi -if [ "$UPD" == "3" ]; then - IP=$(hostname -I | awk '{print $1}') - msg_info "Installing FileBrowser" - curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser users add admin changeme --perm.admin &>/dev/null - msg_ok "Installed FileBrowser" + msg_info "Updating All Containers\n" + CONTAINER_LIST="${1:-$(podman ps -q)}" + for container in ${CONTAINER_LIST}; do + CONTAINER_IMAGE="$(podman inspect --format "{{.Config.Image}}" --type container ${container})" + RUNNING_IMAGE="$(podman inspect --format "{{.Image}}" --type container "${container}")" + podman pull "docker.io/${CONTAINER_IMAGE}" + LATEST_IMAGE="$(podman inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" + if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then + echo "Updating ${container} image ${CONTAINER_IMAGE}" + systemctl restart homeassistant + fi + done + msg_ok "All containers updated." + exit + fi + if [ "$UPD" == "2" ]; then + msg_info "Installing Home Assistant Comunity Store (HACS)" + apt update &>/dev/null + apt install unzip &>/dev/null + cd /var/lib/containers/storage/volumes/hass_config/_data + bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null + msg_ok "Installed Home Assistant Comunity Store (HACS)" + echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" + exit + fi + if [ "$UPD" == "3" ]; then + IP=$(hostname -I | awk '{print $1}') + msg_info "Installing FileBrowser" + curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null + filebrowser config init -a '0.0.0.0' &>/dev/null + filebrowser config set -a '0.0.0.0' &>/dev/null + filebrowser users add admin changeme --perm.admin &>/dev/null + msg_ok "Installed FileBrowser" - msg_info "Creating Service" - service_path="/etc/systemd/system/filebrowser.service" - echo "[Unit] + msg_info "Creating Service" + service_path="/etc/systemd/system/filebrowser.service" + echo "[Unit] Description=Filebrowser After=network-online.target [Service] @@ -121,14 +124,14 @@ if [ "$UPD" == "3" ]; then msg_ok "Completed Successfully!\n" echo -e "FileBrowser should be reachable by going to the following URL. ${BL}http://$IP:8080${CL} admin|changeme\n" - exit -fi -if [ "$UPD" == "4" ]; then - msg_info "Removing ALL Unused Images" - podman image prune -a -f - msg_ok "Removed ALL Unused Images" - exit -fi + exit + fi + if [ "$UPD" == "4" ]; then + msg_info "Removing ALL Unused Images" + podman image prune -a -f + msg_ok "Removed ALL Unused Images" + exit + fi } diff --git a/ct/podman.sh b/ct/podman.sh index bd048a08..08543048 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \____ ____/ /___ ___ ____ _____ / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/containers/registries.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/containers/registries.conf ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/postgresql.sh b/ct/postgresql.sh index b3b9106e..c10ad1d7 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ _____ ____ __ / __ \____ _____/ /_____ _________ / ___// __ \ / / / /_/ / __ \/ ___/ __/ __ / ___/ _ \\__ \/ / / / / / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/prometheus.sh b/ct/prometheus.sh index 3ee8a3de..43404f0c 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ __ / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / /_/ / ___/ __ \/ __ __ \/ _ \/ __/ __ \/ _ \/ / / / ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/prometheus.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/prometheus.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 09c3bdd5..ca0234e7 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \_________ _ __/ /___ __________ / /_/ / ___/ __ \ | /| / / / __ `/ ___/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var/lib/prowlarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var/lib/prowlarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 40cfa24d..13602b05 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ _ __ __ __ ____ _/ __ )(_) /_/ /_____ _____________ ____ / /_ / __ `/ __ / / __/ __/ __ \/ ___/ ___/ _ \/ __ \/ __/ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/radarr.sh b/ct/radarr.sh index 8a1d5972..223187b5 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \____ _____/ /___ __________ / /_/ / __ `/ __ / __ `/ ___/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var/lib/radarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var/lib/radarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 3e70c3dd..7c26d01f 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ ____ __ _ __ ______ __ _________ __ / __ \___ ____ / / / __ \___ / /_ _____(_)___/ / /_ __/___ _____________ ____ / /_ / ____/ (_)__ ____ / /_ / /_/ / _ \/ __ `/ /___/ / / / _ \/ __ \/ ___/ / __ / / / / __ \/ ___/ ___/ _ \/ __ \/ __/ / / / / / _ \/ __ \/ __/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/rdtclient/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /opt/rdtclient/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/readarr.sh b/ct/readarr.sh index 1a1eb7c2..d7eff848 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ / __ \___ ____ _____/ /___ __________ / /_/ / _ \/ __ `/ __ / __ `/ ___/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var/lib/readarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var/lib/readarr/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/rockylinux.sh b/ct/rockylinux.sh index 02a0a090..ec2ce9c7 100644 --- a/ct/rockylinux.sh +++ b/ct/rockylinux.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ __ __ _ / __ \____ _____/ /____ __ / / (_)___ __ ___ __ / /_/ / __ \/ ___/ //_/ / / / / / / / __ \/ / / / |/_/ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /etc/pacman.d ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -dnf -y update -dnf -y upgrade -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -d /etc/pacman.d ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + dnf -y update + dnf -y upgrade + msg_ok "Updated Successfully" + exit } start diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index ce040eb5..fe007cc6 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ ___________ ____ __ _ __ __ / __ \/_ __/ ___// __ \/ /_____| | / /__ / /_ / /_/ / / / \__ \/ /_/ / __/ __ \ | /| / / _ \/ __ \ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index be10fb72..265ec2a0 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _____ ___ ____ __ __ / ___// | / __ )____ ____ / /_ ____/ / \__ \/ /| | / __ / __ \/_ / / __ \/ __ / @@ -51,19 +51,22 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/sabnzbd ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP" -systemctl stop sabnzbd.service -RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null -\cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null -rm -rf SABnzbd-${RELEASE} -cd /opt/sabnzbd -python3 -m pip install -r requirements.txt &>/dev/null -systemctl start sabnzbd.service -msg_ok "Updated $APP" -exit + header_info + if [[ ! -d /opt/sabnzbd ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP" + systemctl stop sabnzbd.service + RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null + \cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null + rm -rf SABnzbd-${RELEASE} + cd /opt/sabnzbd + python3 -m pip install -r requirements.txt &>/dev/null + systemctl start sabnzbd.service + msg_ok "Updated $APP" + exit } start diff --git a/ct/scrypted.sh b/ct/scrypted.sh index e3c15644..2aeac9e4 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _____ __ __ / ___/____________ ______ / /____ ____/ / \__ \/ ___/ ___/ / / / __ \/ __/ _ \/ __ / @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/systemd/system/scrypted.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/systemd/system/scrypted.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/shinobi.sh b/ct/shinobi.sh index 58882700..c182e249 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _____ __ _ __ _ / ___// /_ (_)___ ____ / /_ (_) \__ \/ __ \/ / __ \/ __ \/ __ \/ / @@ -52,16 +52,19 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/Shinobi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating Shinobi LXC" -cd /opt/Shinobi -sh UPDATE.sh -pm2 flush -pm2 restart camera -pm2 restart cron -msg_ok "Updated Shinobi LXC" -exit + header_info + if [[ ! -d /opt/Shinobi ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating Shinobi LXC" + cd /opt/Shinobi + sh UPDATE.sh + pm2 flush + pm2 restart camera + pm2 restart cron + msg_ok "Updated Shinobi LXC" + exit } start diff --git a/ct/sonarr.sh b/ct/sonarr.sh index cbcf3e34..71078486 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _____ / ___/____ ____ ____ __________ \__ \/ __ \/ __ \/ __ `/ ___/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/sonarr.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/syncthing.sh b/ct/syncthing.sh index b45fcfd8..0ad45610 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _____ __ __ _ / ___/__ ______ _____/ /_/ /_ (_)___ ____ _ \__ \/ / / / __ \/ ___/ __/ __ \/ / __ \/ __ `/ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/tautulli.sh b/ct/tautulli.sh index 5baf342d..6c5813f0 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ __ _____ /_ __/___ ___ __/ /___ __/ / (_) / / / __ `/ / / / __/ / / / / / / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/Tautulli/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /opt/Tautulli/ ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/tdarr.sh b/ct/tdarr.sh index cff3d7fc..47dda193 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ __ /_ __/___/ /___ __________ / / / __ / __ `/ ___/ ___/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/tdarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /opt/tdarr ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index fa139dc1..7dee3690 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ __ _ __ _ ____ _ _______ /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ / __ \/ | / / ___/ / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \ @@ -51,20 +51,23 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /etc/dns ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" + header_info + if [[ ! -d /etc/dns ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" -if ! dpkg -s aspnetcore-runtime-7.0 > /dev/null 2>&1; then + if ! dpkg -s aspnetcore-runtime-7.0 >/dev/null 2>&1; then wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb dpkg -i packages-microsoft-prod.deb &>/dev/null apt-get update &>/dev/null apt-get install -y aspnetcore-runtime-7.0 &>/dev/null rm packages-microsoft-prod.deb -fi -bash <(curl -fsSL https://download.technitium.com/dns/install.sh) &>/dev/null -msg_ok "Updated Successfully" -exit + fi + bash <(curl -fsSL https://download.technitium.com/dns/install.sh) &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/transmission.sh b/ct/transmission.sh index fd8a5c2d..1f2f9f45 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ _ _ /_ __/________ _____ _________ ___ (_)_________(_)___ ____ / / / ___/ __ `/ __ \/ ___/ __ `__ \/ / ___/ ___/ / __ \/ __ \ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/transmission-daemon/settings.json ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + if [[ ! -f /etc/transmission-daemon/settings.json ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/trilium.sh b/ct/trilium.sh index 7216f249..51907894 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ______ _ ___ /_ __/____(_) (_)_ ______ ___ / / / ___/ / / / / / / __ `__ \ @@ -51,33 +51,36 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/trilium ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | + header_info + if [[ ! -d /opt/trilium ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/zadam/trilium/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - -msg_info "Stopping ${APP}" -systemctl stop trilium.service -sleep 1 -msg_ok "Stopped ${APP}" -msg_info "Updating to v${RELEASE}" -wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null -cp -r trilium-linux-x64-server/* /opt/trilium/ -msg_ok "Updated to v${RELEASE}" + msg_info "Stopping ${APP}" + systemctl stop trilium.service + sleep 1 + msg_ok "Stopped ${APP}" + + msg_info "Updating to v${RELEASE}" + wget -q https://github.com/zadam/trilium/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz + tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null + cp -r trilium-linux-x64-server/* /opt/trilium/ + msg_ok "Updated to v${RELEASE}" -msg_info "Cleaning up" -rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server -msg_ok "Cleaned" + msg_info "Cleaning up" + rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server + msg_ok "Cleaned" -msg_info "Starting ${APP}" -systemctl start trilium.service -sleep 1 -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" -exit + msg_info "Starting ${APP}" + systemctl start trilium.service + sleep 1 + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 1804b96b..88f21eb1 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ ____ __ / / / / /_ __ ______ / /___ __ / / / / __ \/ / / / __ \/ __/ / / / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 8babfc1b..c7630ef5 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ __ __ / / / /___ ___ / /_ ________ / / / / / / __ `__ \/ __ \/ ___/ _ \/ / @@ -52,12 +52,12 @@ function default_settings() { } function update_script() { -header_info -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" -exit + header_info + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit } start diff --git a/ct/unifi.sh b/ct/unifi.sh index 5f20a0ed..e56e26e8 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ _ _____ / / / /__ (_) __(_) / / / / __ \/ / /_/ / @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP}" -apt-get update -apt-get install -y unifi -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -d /usr/lib/unifi ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + apt-get update + apt-get install -y unifi + msg_ok "Updated Successfully" + exit } start diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index 108a004a..2822bc00 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ __ _ __ __ / / / /___ / /_(_)___ ___ ___ / //_/_ ______ ___ ____ _ / / / / __ \/ __/ / __ __ \/ _ \ / ,< / / / / __ __ \/ __ / @@ -52,30 +52,33 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/uptime-kuma ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -msg_info "Stopping ${APP}" -sudo systemctl stop uptime-kuma &>/dev/null -msg_ok "Stopped ${APP}" + header_info + if [[ ! -d /opt/uptime-kuma ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) + msg_info "Stopping ${APP}" + sudo systemctl stop uptime-kuma &>/dev/null + msg_ok "Stopped ${APP}" -cd /opt/uptime-kuma + cd /opt/uptime-kuma -msg_info "Pulling ${APP} ${LATEST}" -git fetch --all &>/dev/null -git checkout $LATEST --force &>/dev/null -msg_ok "Pulled ${APP} ${LATEST}" + msg_info "Pulling ${APP} ${LATEST}" + git fetch --all &>/dev/null + git checkout $LATEST --force &>/dev/null + msg_ok "Pulled ${APP} ${LATEST}" -msg_info "Updating ${APP} to ${LATEST}" -npm install --production &>/dev/null -npm run download-dist &>/dev/null -msg_ok "Updated ${APP}" + msg_info "Updating ${APP} to ${LATEST}" + npm install --production &>/dev/null + npm run download-dist &>/dev/null + msg_ok "Updated ${APP}" -msg_info "Starting ${APP}" -sudo systemctl start uptime-kuma &>/dev/null -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" -exit + msg_info "Starting ${APP}" + sudo systemctl start uptime-kuma &>/dev/null + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 4304d4aa..c0707ef1 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ ____ _ | | / / /_ (_)________ ____ __________ | | /| / / __ \/ / ___/ __ \/ __ `/ ___/ ___/ @@ -52,13 +52,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /var/lib/whisparr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -d /var/lib/whisparr ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/whoogle.sh b/ct/whoogle.sh index c6054537..23af8603 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ ____ ______ ____ ________ ______ | | / / / / / __ \/ __ \/ ____/ / / ____/ | | /| / / /_/ / / / / / / / / __/ / / __/ @@ -51,12 +51,15 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /usr/local/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating ${APP} LXC" -pip3 install whoogle-search --upgrade &>/dev/null -msg_ok "Updated Successfully" -exit + header_info + if [[ ! -f /usr/local/bin/whoogle-search ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + pip3 install whoogle-search --upgrade &>/dev/null + msg_ok "Updated Successfully" + exit } start diff --git a/ct/wikijs.sh b/ct/wikijs.sh index a8f58ce8..c799d395 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ ___ __ _ _ | | / (_) /__(_) (_)____ | | /| / / / //_/ / / / ___/ @@ -52,35 +52,38 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/wikijs ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Stopping ${APP}" -systemctl stop wikijs -msg_ok "Stopped ${APP}" + header_info + if [[ ! -d /opt/wikijs ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping ${APP}" + systemctl stop wikijs + msg_ok "Stopped ${APP}" -msg_info "Backing up Data" -mkdir -p data-backup -cp -R /opt/wikijs/{db.sqlite,config.yml,/data} ~/data-backup -msg_ok "Backed up Data" + msg_info "Backing up Data" + mkdir -p data-backup + cp -R /opt/wikijs/{db.sqlite,config.yml,/data} ~/data-backup + msg_ok "Backed up Data" -msg_info "Updating ${APP}" -rm -rf /opt/wikijs/* -cd /opt/wikijs -wget -q https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz -tar xzf wiki-js.tar.gz -msg_ok "Updated ${APP}" + msg_info "Updating ${APP}" + rm -rf /opt/wikijs/* + cd /opt/wikijs + wget -q https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz + tar xzf wiki-js.tar.gz + msg_ok "Updated ${APP}" -msg_info "Restoring Data" -cp -R ~/data-backup/* /opt/wikijs -rm -rf ~/data-backup -npm rebuild sqlite3 &>/dev/null -msg_ok "Restored Data" + msg_info "Restoring Data" + cp -R ~/data-backup/* /opt/wikijs + rm -rf ~/data-backup + npm rebuild sqlite3 &>/dev/null + msg_ok "Restored Data" -msg_info "Starting ${APP}" -systemctl start wikijs -msg_ok "Started ${APP}" -msg_ok "Updated Successfully" -exit + msg_info "Starting ${APP}" + systemctl start wikijs + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 60156f2e..7f40f270 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _ ___ ______ __ | | / (_)_______ / ____/_ ______ __________/ / | | /| / / / ___/ _ \/ / __/ / / / __ `/ ___/ __ / @@ -51,48 +51,51 @@ function default_settings() { } function update_script() { -if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ - "1" "Update ${APP} LXC" ON \ - "2" "Install WGDashboard" OFF \ - 3>&1 1>&2 2>&3) -header_info -if [ "$UPD" == "1" ]; then -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated Successfully" -exit -fi -if [ "$UPD" == "2" ]; then - if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then - msg_error "Existing WGDashboard Installation Found!"; - exit + if [[ ! -d /etc/pivpn/wireguard ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ + "1" "Update ${APP} LXC" ON \ + "2" "Install WGDashboard" OFF \ + 3>&1 1>&2 2>&3) + header_info + if [ "$UPD" == "1" ]; then + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit fi -IP=$(hostname -I | awk '{print $1}') -msg_info "Installing Python3-pip" -apt-get install -y python3-pip &>/dev/null -pip install flask &>/dev/null -pip install ifcfg &>/dev/null -pip install flask_qrcode &>/dev/null -pip install icmplib &>/dev/null -msg_ok "Installed Python3-pip" + if [ "$UPD" == "2" ]; then + if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then + msg_error "Existing WGDashboard Installation Found!" + exit + fi + IP=$(hostname -I | awk '{print $1}') + msg_info "Installing Python3-pip" + apt-get install -y python3-pip &>/dev/null + pip install flask &>/dev/null + pip install ifcfg &>/dev/null + pip install flask_qrcode &>/dev/null + pip install icmplib &>/dev/null + msg_ok "Installed Python3-pip" -msg_info "Installing WGDashboard" -WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | - grep "tag_name" | - awk '{print substr($2, 2, length($2)-3) }') + msg_info "Installing WGDashboard" + WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest | + grep "tag_name" | + awk '{print substr($2, 2, length($2)-3) }') -git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null -cd /etc/wgdashboard/src -sudo chmod u+x wgd.sh -sudo ./wgd.sh install &>/dev/null -sudo chmod -R 755 /etc/wireguard -msg_ok "Installed WGDashboard" + git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null + cd /etc/wgdashboard/src + sudo chmod u+x wgd.sh + sudo ./wgd.sh install &>/dev/null + sudo chmod -R 755 /etc/wireguard + msg_ok "Installed WGDashboard" -msg_info "Creating Service" -service_path="/etc/systemd/system/wg-dashboard.service" -echo "[Unit] + msg_info "Creating Service" + service_path="/etc/systemd/system/wg-dashboard.service" + echo "[Unit] After=systemd-networkd.service [Service] @@ -103,15 +106,15 @@ Restart=always [Install] WantedBy=default.target" >$service_path -chmod 664 /etc/systemd/system/wg-dashboard.service -systemctl daemon-reload -systemctl enable wg-dashboard.service &>/dev/null -systemctl start wg-dashboard.service &>/dev/null -msg_ok "Created Service" -echo -e "WGDashboard should be reachable by going to the following URL. + chmod 664 /etc/systemd/system/wg-dashboard.service + systemctl daemon-reload + systemctl enable wg-dashboard.service &>/dev/null + systemctl start wg-dashboard.service &>/dev/null + msg_ok "Created Service" + echo -e "WGDashboard should be reachable by going to the following URL. ${BL}http://${IP}:10086${CL} admin|admin \n" -exit -fi + exit + fi } start diff --git a/ct/yunohost.sh b/ct/yunohost.sh index b024d239..c99bfdb6 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" __ __ __ __ __ \ \/ /_ ______ ____ / / / /___ _____/ /_ \ / / / / __ \/ __ \/ /_/ / __ \/ ___/ __/ @@ -51,13 +51,16 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" -exit + header_info + if [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + exit } start diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 354a4434..bf50bc3e 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -6,8 +6,8 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" _____ /__ / ____ _________ __ ____ __ / / / __ \/ ___/ __ `/ |/_/ / / / @@ -51,10 +51,13 @@ function default_settings() { } function update_script() { -header_info -if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." -exit + header_info + if [[ ! -d /opt/zoraxy/src ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "There is currently no update path available." + exit } start diff --git a/install/adguard-install.sh b/install/adguard-install.sh index 4b03cb71..71536f26 100644 --- a/install/adguard-install.sh +++ b/install/adguard-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/alpine-docker-install.sh b/install/alpine-docker-install.sh index eacbe6b0..76c7bd5c 100644 --- a/install/alpine-docker-install.sh +++ b/install/alpine-docker-install.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -37,7 +37,7 @@ read -r -p "Would you like to add Portainer? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" docker volume create portainer_data >/dev/null - $STD docker run -d \ + $STD docker run -d \ -p 8000:8000 \ -p 9000:9000 \ --name=portainer \ @@ -59,4 +59,4 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then fi motd_ssh -customize \ No newline at end of file +customize diff --git a/install/alpine-grafana-install.sh b/install/alpine-grafana-install.sh index 09dc91ef..e48aeee4 100644 --- a/install/alpine-grafana-install.sh +++ b/install/alpine-grafana-install.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -29,4 +29,4 @@ $STD rc-update add grafana default msg_ok "Installed Grafana" motd_ssh -customize \ No newline at end of file +customize diff --git a/install/alpine-vaultwarden-install.sh b/install/alpine-vaultwarden-install.sh index c66c36b3..e9f9d82c 100644 --- a/install/alpine-vaultwarden-install.sh +++ b/install/alpine-vaultwarden-install.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -30,7 +30,7 @@ msg_ok "Installed Alpine-Vaultwarden" msg_info "Installing Web-Vault" $STD apk add vaultwarden-web-vault -msg_ok "Installed Web-Vault" +msg_ok "Installed Web-Vault" msg_info "Starting Alpine-Vaultwarden" $STD rc-service vaultwarden start diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index 322e6e5f..b8089962 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -26,4 +26,4 @@ $STD apk add zigbee2mqtt msg_ok "Installed Alpine-Zigbee2MQTT" motd_ssh -customize \ No newline at end of file +customize diff --git a/install/audiobookshelf-install.sh b/install/audiobookshelf-install.sh index b0abeca6..d1725da4 100644 --- a/install/audiobookshelf-install.sh +++ b/install/audiobookshelf-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/autobrr-install.sh b/install/autobrr-install.sh index 5a50883d..a564e25c 100644 --- a/install/autobrr-install.sh +++ b/install/autobrr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index a8f07da9..b869b324 100755 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -64,4 +64,4 @@ msg_info "Cleaning up" rm -rf bazarr.zip $STD apt-get autoremove $STD apt-get autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" diff --git a/install/blocky-install.sh b/install/blocky-install.sh index 6ef5abcc..60134b7b 100644 --- a/install/blocky-install.sh +++ b/install/blocky-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/casaos-install.sh b/install/casaos-install.sh index c0a068d0..dc0d1d36 100644 --- a/install/casaos-install.sh +++ b/install/casaos-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -23,14 +23,14 @@ msg_info "Installing CasaOS (Patience)" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + cd /usr/local/bin + curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 + chmod 755 /usr/local/bin/fuse-overlayfs + cd ~ + echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json fi $STD bash <(curl -fsSL https://get.casaos.io) msg_ok "Installed CasaOS" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 7bae8084..1284c318 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/cloudflared-install.sh b/install/cloudflared-install.sh index 3d41a7b9..fb51c6bd 100644 --- a/install/cloudflared-install.sh +++ b/install/cloudflared-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index a38bcf06..8a0930db 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh index 8118f42b..e7fec147 100644 --- a/install/daemonsync-install.sh +++ b/install/daemonsync-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 44d85f86..c909f855 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/debian-install.sh b/install/debian-install.sh index af84fbb8..07dca9c9 100644 --- a/install/debian-install.sh +++ b/install/debian-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -25,4 +25,4 @@ customize msg_info "Cleaning up" $STD apt-get autoremove $STD apt-get autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" diff --git a/install/deconz-install.sh b/install/deconz-install.sh index 54631139..65167807 100644 --- a/install/deconz-install.sh +++ b/install/deconz-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/deluge-install.sh b/install/deluge-install.sh index 1fde3caa..d3ca9e89 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/devuan-install.sh b/install/devuan-install.sh index 64e6f242..07dca9c9 100644 --- a/install/devuan-install.sh +++ b/install/devuan-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/emby-install.sh b/install/emby-install.sh index 52fc3af6..016517c8 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -24,10 +24,10 @@ if [[ "$CTTYPE" == "0" ]]; then $STD apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd else - $STD apt-get install -y intel-opencl-icd + $STD apt-get install -y intel-opencl-icd fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri diff --git a/install/emqx-install.sh b/install/emqx-install.sh index a1d69324..e883f933 100644 --- a/install/emqx-install.sh +++ b/install/emqx-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/fhem-install.sh b/install/fhem-install.sh index e3ce0f67..c0a97821 100644 --- a/install/fhem-install.sh +++ b/install/fhem-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/go2rtc-install.sh b/install/go2rtc-install.sh index a5092fd8..cd7c388b 100644 --- a/install/go2rtc-install.sh +++ b/install/go2rtc-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 6f5a3efc..d0a34be6 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/grocy-install.sh b/install/grocy-install.sh index 33f2e31d..4543a873 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/heimdalldashboard-install.sh b/install/heimdalldashboard-install.sh index 78d3be90..724cdfaf 100644 --- a/install/heimdalldashboard-install.sh +++ b/install/heimdalldashboard-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index ed071136..717392f7 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/homepage-install.sh b/install/homepage-install.sh index f0c221e5..39242447 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/homer-install.sh b/install/homer-install.sh index f4a8d3eb..116a8922 100644 --- a/install/homer-install.sh +++ b/install/homer-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index 17971c57..dae211d3 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index b1683824..c4aad687 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -24,7 +24,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" wget -q https://repos.influxdata.com/influxdata-archive_compat.key -cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null +cat influxdata-archive_compat.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg >/dev/null sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main" > /etc/apt/sources.list.d/influxdata.list' msg_ok "Set up InfluxDB Repository" diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index ae553a46..567c2412 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/jackett-install.sh b/install/jackett-install.sh index e54858d5..be4a299f 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 787b0ab2..7363b434 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -25,10 +25,10 @@ if [[ "$CTTYPE" == "0" ]]; then $STD apt-get -y install \ va-driver-all \ ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd else - $STD apt-get install -y intel-opencl-icd + $STD apt-get install -y intel-opencl-icd fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri @@ -37,10 +37,10 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_info "Installing Jellyfin" -VERSION="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )" +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" # If the keyring directory is absent, create it if [[ ! -d /etc/apt/keyrings ]]; then - mkdir -p /etc/apt/keyrings + mkdir -p /etc/apt/keyrings fi # Download the repository signing key and install it to the keyring directory curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor --yes --output /etc/apt/keyrings/jellyfin.gpg diff --git a/install/k0s-install.sh b/install/k0s-install.sh index 323bbebe..7e6132dd 100644 --- a/install/k0s-install.sh +++ b/install/k0s-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -25,14 +25,14 @@ $STD bash <(curl -sSLf https://get.k0s.sh) $STD k0s install controller --single $STD k0s start mkdir -p /etc/k0s -k0s config create > /etc/k0s/k0s.yaml +k0s config create >/etc/k0s/k0s.yaml msg_ok "Installed k0s Kubernetes" read -r -p "Would you like to add Helm Package Manager? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Installing Helm" -$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) -msg_ok "Installed Helm" + msg_info "Installing Helm" + $STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) + msg_ok "Installed Helm" fi motd_ssh customize diff --git a/install/kavita-install.sh b/install/kavita-install.sh index b3fe9267..a2380ce2 100644 --- a/install/kavita-install.sh +++ b/install/kavita-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index e5081b8e..2554c493 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/lidarr-install.sh b/install/lidarr-install.sh index e03c7680..beb06741 100644 --- a/install/lidarr-install.sh +++ b/install/lidarr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 52d480b0..1ad0323e 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index e7af61e1..ce9b7842 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index ec191bdc..cd6be5a2 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index 227cffd0..c077c83d 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index 9534db5a..33c14ef4 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 6f36c40b..424c955d 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index d1a890db..a3c0b1fc 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index 912e5ad6..13624a84 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/nocodb-install.sh b/install/nocodb-install.sh index 23713d69..33c83926 100644 --- a/install/nocodb-install.sh +++ b/install/nocodb-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/node-red-install.sh b/install/node-red-install.sh index 8e4d803b..5ace15b0 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index 3121387c..196692a0 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -39,7 +39,7 @@ chown -R octoprint:octoprint /opt msg_ok "Created user octoprint" msg_info "Installing OctoPrint" -$STD sudo -u octoprint bash << EOF +$STD sudo -u octoprint bash <openhab.gpg mv openhab.gpg /usr/share/keyrings chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg -echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > /etc/apt/sources.list.d/openhab.list +echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" >/etc/apt/sources.list.d/openhab.list $STD apt update $STD apt-get -y install openhab systemctl daemon-reload diff --git a/install/openobserve-install.sh b/install/openobserve-install.sh index 48a03e31..ec08a09f 100644 --- a/install/openobserve-install.sh +++ b/install/openobserve-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index df63bd6e..04f65652 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 881cb233..40acbd99 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/plex-install.sh b/install/plex-install.sh index 5e7fda8d..cc2ab6a6 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -23,11 +23,11 @@ if [[ "$CTTYPE" == "0" ]]; then msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install \ va-driver-all \ - ocl-icd-libopencl1 - if [[ ${PCT_OSVERSION} == "20.04" ]]; then - $STD apt-get install -y beignet-opencl-icd + ocl-icd-libopencl1 + if [[ ${PCT_OSVERSION} == "20.04" ]]; then + $STD apt-get install -y beignet-opencl-icd else - $STD apt-get install -y intel-opencl-icd + $STD apt-get install -y intel-opencl-icd fi /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index a0fb4f5e..72d024a4 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/podman-install.sh b/install/podman-install.sh index 951da53b..1ffab7b9 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Podman" $STD apt-get -y install podman $STD systemctl enable --now podman.socket -echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf +echo -e 'unqualified-search-registries=["docker.io"]' >>/etc/containers/registries.conf msg_ok "Installed Podman" motd_ssh diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index 309b2d50..0d495b30 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index f2aad6fd..2bc3da31 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/prowlarr-install.sh b/install/prowlarr-install.sh index b999d9b5..d3bea98e 100644 --- a/install/prowlarr-install.sh +++ b/install/prowlarr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh index 1a6147d2..7d059b1b 100644 --- a/install/qbittorrent-install.sh +++ b/install/qbittorrent-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/radarr-install.sh b/install/radarr-install.sh index f9e88aa5..beca9cd3 100644 --- a/install/radarr-install.sh +++ b/install/radarr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index 8de86327..aa61b611 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/readarr-install.sh b/install/readarr-install.sh index 43897970..2de65151 100644 --- a/install/readarr-install.sh +++ b/install/readarr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/rtsptoweb-install.sh b/install/rtsptoweb-install.sh index 583137be..d3732c1d 100644 --- a/install/rtsptoweb-install.sh +++ b/install/rtsptoweb-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 6c97bd07..29b5b1a4 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/scrypted-install.sh b/install/scrypted-install.sh index b8707308..07e459bf 100644 --- a/install/scrypted-install.sh +++ b/install/scrypted-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -19,21 +19,21 @@ $STD apt-get -y update $STD apt-get -y upgrade $STD apt-get install -y avahi-daemon $STD apt-get -y install \ - build-essential \ - gcc \ - gir1.2-gtk-3.0 \ - libcairo2-dev \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libjpeg-dev \ - libgif-dev \ - libopenjp2-7 \ - libpango1.0-dev \ - librsvg2-dev \ - pkg-config \ - curl \ - sudo \ - mc + build-essential \ + gcc \ + gir1.2-gtk-3.0 \ + libcairo2-dev \ + libgirepository1.0-dev \ + libglib2.0-dev \ + libjpeg-dev \ + libgif-dev \ + libopenjp2-7 \ + libpango1.0-dev \ + librsvg2-dev \ + pkg-config \ + curl \ + sudo \ + mc msg_ok "Installed Dependencies" if [[ "$CTTYPE" == "0" ]]; then @@ -50,16 +50,16 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_info "Installing GStreamer (Patience)" $STD apt-get -y install \ - gstreamer1.0-tools \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgstreamer-plugins-bad1.0-dev \ - gstreamer1.0-plugins-base \ - gstreamer1.0-plugins-good \ - gstreamer1.0-plugins-bad \ - gstreamer1.0-plugins-ugly \ - gstreamer1.0-libav \ - gstreamer1.0-alsa + gstreamer1.0-tools \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libgstreamer-plugins-bad1.0-dev \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + gstreamer1.0-libav \ + gstreamer1.0-alsa msg_ok "Installed GStreamer" msg_info "Setting up Node.js Repository" @@ -79,27 +79,27 @@ msg_ok "Updated Python3" msg_info "Installing Python3 Dependencies" $STD apt-get -y install \ - python3-gi \ - python3-gst-1.0 \ - python3-matplotlib \ - python3-numpy \ - python3-opencv \ - python3-pil \ - python3-setuptools \ - python3-skimage \ - python3-wheel + python3-gi \ + python3-gst-1.0 \ + python3-matplotlib \ + python3-numpy \ + python3-opencv \ + python3-pil \ + python3-setuptools \ + python3-skimage \ + python3-wheel $STD python3 -m pip install --upgrade pip $STD python3 -m pip install aiofiles debugpy typing_extensions typing msg_ok "Installed Python3 Dependencies" read -r -p "Would you like to add Coral Edge TPU support? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Adding Coral Edge TPU Support" -wget -qO /etc/apt/trusted.gpg.d/coral-repo.asc "https://packages.cloud.google.com/apt/doc/apt-key.gpg" -echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" >/etc/apt/sources.list.d/coral-edgetpu.list -$STD apt-get -y update -$STD apt-get -y install libedgetpu1-std -msg_ok "Coral Edge TPU Support Added" + msg_info "Adding Coral Edge TPU Support" + wget -qO /etc/apt/trusted.gpg.d/coral-repo.asc "https://packages.cloud.google.com/apt/doc/apt-key.gpg" + echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" >/etc/apt/sources.list.d/coral-edgetpu.list + $STD apt-get -y update + $STD apt-get -y install libedgetpu1-std + msg_ok "Coral Edge TPU Support Added" fi msg_info "Installing Scrypted" diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 3d8801dd..be3bc831 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -48,7 +48,7 @@ gitVersionNumber=$(git rev-parse HEAD) theDateRightNow=$(date) touch version.json chmod 777 version.json -echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' > version.json +echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' >version.json msg_ok "Cloned Shinobi" msg_info "Installing Database" @@ -62,7 +62,7 @@ mysql -e "source sql/user.sql" || true mysql -e "source sql/framework.sql" || true msg_ok "Installed Database" cp conf.sample.json conf.json -cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}') +cronKey=$(head -c 1024 /dev/null +node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 /dev/null $STD pm2 start camera.js $STD pm2 start cron.js $STD pm2 startup diff --git a/install/sonarr-install.sh b/install/sonarr-install.sh index e2857b87..331119d2 100644 --- a/install/sonarr-install.sh +++ b/install/sonarr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -17,7 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y gnupg +$STD apt-get install -y gnupg $STD apt-get install -y ca-certificates msg_ok "Installed Dependencies" diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 3e8eef08..a7776709 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/tautulli-install.sh b/install/tautulli-install.sh index da91ab84..3ceb8682 100644 --- a/install/tautulli-install.sh +++ b/install/tautulli-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/tdarr-install.sh b/install/tdarr-install.sh index 5e097586..d81b844f 100644 --- a/install/tdarr-install.sh +++ b/install/tdarr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -25,7 +25,7 @@ if [[ "$CTTYPE" == "0" ]]; then va-driver-all \ ocl-icd-libopencl1 \ intel-opencl-icd - + /bin/chgrp video /dev/dri /bin/chmod 755 /dev/dri /bin/chmod 660 /dev/dri/* diff --git a/install/technitiumdns-install.sh b/install/technitiumdns-install.sh index f2b67d39..9533820d 100644 --- a/install/technitiumdns-install.sh +++ b/install/technitiumdns-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/transmission-install.sh b/install/transmission-install.sh index 969e6aea..cccdebff 100644 --- a/install/transmission-install.sh +++ b/install/transmission-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -19,7 +19,6 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" - msg_info "Installing Transmission" $STD apt-get install -y transmission-daemon systemctl stop transmission-daemon diff --git a/install/trilium-install.sh b/install/trilium-install.sh index da811245..a0ee9275 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/ubuntu-install.sh b/install/ubuntu-install.sh index 64e6f242..07dca9c9 100644 --- a/install/ubuntu-install.sh +++ b/install/ubuntu-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh index ea4d17ba..ab93d025 100644 --- a/install/umbrel-install.sh +++ b/install/umbrel-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -23,14 +23,14 @@ msg_info "Installing Umbrel (Patience)" DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p $(dirname $DOCKER_CONFIG_PATH) if [ "$ST" == "yes" ]; then -VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /usr/local/bin -curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 -chmod 755 /usr/local/bin/fuse-overlayfs -cd ~ -echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + VER=$(curl -s https://api.github.com/repos/containers/fuse-overlayfs/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + cd /usr/local/bin + curl -sSL -o fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/$VER/fuse-overlayfs-x86_64 + chmod 755 /usr/local/bin/fuse-overlayfs + cd ~ + echo -e '{\n "storage-driver": "fuse-overlayfs",\n "log-driver": "journald"\n}' >/etc/docker/daemon.json else -echo -e '{\n "log-driver": "journald"\n}' > /etc/docker/daemon.json + echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json fi $STD bash <(curl -fsSL https://umbrel.sh) systemctl daemon-reload diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 4ce0e417..399bc3e5 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index c78a890e..94853a3d 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/whisparr-install.sh b/install/whisparr-install.sh index 422ae576..cfde905b 100644 --- a/install/whisparr-install.sh +++ b/install/whisparr-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -17,7 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y sqlite3 +$STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" msg_info "Installing Whisparr" diff --git a/install/whoogle-install.sh b/install/whoogle-install.sh index e513288d..1e3becea 100644 --- a/install/whoogle-install.sh +++ b/install/whoogle-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 32152da6..d8ccd7f9 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index a133b2df..88a05bfe 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index 80fd97c4..c986f79d 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index eb10fdd6..4b3ebb7d 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -45,7 +45,7 @@ fi msg_info "Installing Zigbee2MQTT" cd /opt/zigbee2mqtt if [[ $DEV == "y" ]]; then -$STD git checkout dev + $STD git checkout dev fi $STD npm ci msg_ok "Installed Zigbee2MQTT" diff --git a/install/zoraxy-install.sh b/install/zoraxy-install.sh index 5e23e065..e0a0c7a6 100644 --- a/install/zoraxy-install.sh +++ b/install/zoraxy-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index a9a05c3e..78dbe3b8 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 52de7c9f..3363bfc8 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -6,7 +6,7 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -cat <<"EOF" + cat <<"EOF" ______ _ __ __ /_ __/___ _(_) /_____________ _/ /__ / / / __ `/ / / ___/ ___/ __ `/ / _ \ diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 96d1f849..f7af3c4c 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -118,8 +118,8 @@ motd_ssh() { customize() { if [[ "$PASSWORD" == "" ]]; then - msg_info "Customizing Container" - bash -c "passwd -d root" >/dev/null 2>&1 - msg_ok "Customized Container" + msg_info "Customizing Container" + bash -c "passwd -d root" >/dev/null 2>&1 + msg_ok "Customized Container" fi -} \ No newline at end of file +} diff --git a/misc/bluetooth.sh b/misc/bluetooth.sh index d3a3ca60..ee775c8f 100644 --- a/misc/bluetooth.sh +++ b/misc/bluetooth.sh @@ -5,7 +5,10 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi +if command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Can't Run from the Proxmox Shell" + exit +fi set -e clear @@ -19,7 +22,7 @@ while true; do done clear - cat <<"EOF" +cat <<"EOF" __ __ ___ _ __ __ / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ @@ -42,17 +45,17 @@ clear EOF read -r -p "Switch from dbus-daemon to dbus-broker? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -cat <>/etc/apt/sources.list + cat <>/etc/apt/sources.list deb http://deb.debian.org/debian bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free EOF -apt-get update &>/dev/null -apt-get -t bullseye-backports install -y dbus-broker &>/dev/null -systemctl enable dbus-broker.service &>/dev/null + apt-get update &>/dev/null + apt-get -t bullseye-backports install -y dbus-broker &>/dev/null + systemctl enable dbus-broker.service &>/dev/null fi read -r -p "Install BlueZ? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -apt-get -t bullseye-backports install -y bluez* &>/dev/null + apt-get -t bullseye-backports install -y bluez* &>/dev/null fi echo -e "Finished, reboot for changes to take affect" diff --git a/misc/clean.sh b/misc/clean.sh index 1d32009e..ae7affb0 100644 --- a/misc/clean.sh +++ b/misc/clean.sh @@ -6,8 +6,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info() { -clear -cat <<"EOF" + clear + cat <<"EOF" ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ / / / / _ \/ __ `/ __ \ / / | / / diff --git a/misc/code-server.sh b/misc/code-server.sh index cc32de97..4fbf2946 100644 --- a/misc/code-server.sh +++ b/misc/code-server.sh @@ -46,7 +46,10 @@ function error_exit() { } clear header_info -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi +if command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Can't Install on Proxmox " + exit +fi while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in diff --git a/misc/container-restore-from-backup.sh b/misc/container-restore-from-backup.sh index efb169d1..120ff2b7 100644 --- a/misc/container-restore-from-backup.sh +++ b/misc/container-restore-from-backup.sh @@ -6,7 +6,10 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE clear -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi +if command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Can't Run from the Proxmox Shell" + exit +fi YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh index 0ff1828e..e6e01f71 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh @@ -8,7 +8,10 @@ # Use to copy all data from one Home Assistant LXC to another # run from the Proxmox Shell clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from one Home Assistant LXC to another. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh index f278911a..fe9c5a83 100644 --- a/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh @@ -6,7 +6,10 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh index 62f9ed8b..73ffc207 100644 --- a/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh +++ b/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh @@ -8,7 +8,10 @@ # Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. # run from the Proxmox Shell clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh index 3a451f17..6625169e 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh @@ -6,7 +6,10 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh index 5244c284..eebd6ec2 100644 --- a/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh +++ b/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh @@ -6,7 +6,10 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from a Home Assistant Core LXC to a Home Assistant Core LXC. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/plex-copy-data-plex.sh b/misc/copy-data/plex-copy-data-plex.sh index 35e43bea..e4d694da 100644 --- a/misc/copy-data/plex-copy-data-plex.sh +++ b/misc/copy-data/plex-copy-data-plex.sh @@ -8,7 +8,10 @@ # Use to copy all data from one Plex Media Server LXC to another # run from the Proxmox Shell clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from one Plex Media Server LXC to another. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh index 8db36359..8569f730 100644 --- a/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh +++ b/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh @@ -8,7 +8,10 @@ # Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. # run from the Proxmox Shell clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/z2m-copy-data-z2m.sh b/misc/copy-data/z2m-copy-data-z2m.sh index 69a3573a..77c0db76 100644 --- a/misc/copy-data/z2m-copy-data-z2m.sh +++ b/misc/copy-data/z2m-copy-data-z2m.sh @@ -8,7 +8,10 @@ # Use to copy all data from one Zigbee2MQTT LXC to another # run from the Proxmox Shell clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from one Zigbee2MQTT LXC to another. Proceed(y/n)?" yn case $yn in diff --git a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh index 9f58fc5b..1193d42a 100644 --- a/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh +++ b/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh @@ -8,7 +8,10 @@ # Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC # run from the Proxmox Shell clear -if ! command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Run from the Proxmox Shell"; exit; fi +if ! command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Run from the Proxmox Shell" + exit +fi while true; do read -p "Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC. Proceed(y/n)?" yn case $yn in diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index 0f41adfc..1ee919f7 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -6,7 +6,10 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE clear -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi +if command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Can't Run from the Proxmox Shell" + exit +fi YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") diff --git a/misc/crowdsec.sh b/misc/crowdsec.sh index 712e0b19..d18939d7 100644 --- a/misc/crowdsec.sh +++ b/misc/crowdsec.sh @@ -33,7 +33,10 @@ function error_exit() { echo -e "$flag $msg" 1>&2 exit $EXIT } -if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Install on Proxmox "; exit; fi +if command -v pveversion >/dev/null 2>&1; then + echo -e "⚠️ Can't Install on Proxmox " + exit +fi while true; do read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn case $yn in diff --git a/misc/edge-kernel.sh b/misc/edge-kernel.sh index 876f5cab..df10d5e6 100644 --- a/misc/edge-kernel.sh +++ b/misc/edge-kernel.sh @@ -7,7 +7,7 @@ # bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)" function header_info { -cat <<"EOF" + cat <<"EOF" ____ _ ________ ______ __ __ __ __ / __ \ | / / ____/ / ____/___/ /___ ____ / //_/__ _________ ___ / /____ / /_/ / | / / __/ / __/ / __ / __ `/ _ \ / ,< / _ \/ ___/ __ \/ _ \/ / ___/ diff --git a/misc/kernel-clean.sh b/misc/kernel-clean.sh index 81bc0e63..904bb197 100644 --- a/misc/kernel-clean.sh +++ b/misc/kernel-clean.sh @@ -63,20 +63,20 @@ function check_root() { fi } - VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" +VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" function other_kernel() { - if [[ "${VERSION}" == "bullseye" ]]; then - if [[ "$current_kernel" == *"edge"* ]]; then - echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" - echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" - exit 1 - fi - if [[ "$current_kernel" == *"6.1"* || "$current_kernel" == *"6.2"* ]]; then - echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" - echo -e "\nThe script cannot be used when running opt-in kernels. \nProxmox VE's package management relies directly on the current default kernel, which is 5.15. \nTherefore, it is not possible to utilize this script. In this case, you should use autoremove instead. \n`apt-get autoremove`\n" - exit 1 + if [[ "${VERSION}" == "bullseye" ]]; then + if [[ "$current_kernel" == *"edge"* ]]; then + echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" + echo -e "\nAn Active PVE Kernel is required to use Kernel Clean\n" + exit 1 + fi + if [[ "$current_kernel" == *"6.1"* || "$current_kernel" == *"6.2"* ]]; then + echo -e "\n${CROSS} ${RD}ERROR:${CL} Proxmox ${BL}${current_kernel}${CL} Kernel Active" + echo -e "\nThe script cannot be used when running opt-in kernels. \nProxmox VE's package management relies directly on the current default kernel, which is 5.15. \nTherefore, it is not possible to utilize this script. In this case, you should use autoremove instead. \n$(apt-get autoremove)\n" + exit 1 + fi fi - fi } function kernel_info() { diff --git a/misc/microcode.sh b/misc/microcode.sh index fa427cb0..6b53220d 100644 --- a/misc/microcode.sh +++ b/misc/microcode.sh @@ -54,7 +54,7 @@ intel() { msg_info "Installing iucode-tool: a tool for updating Intel processor microcode" apt-get install -y iucode-tool &>/dev/null msg_ok "Installed iucode-tool" - + msg_info "Downloading the latest Intel Processor Microcode Package for Linux" wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/intel-microcode_3.20230512.1_amd64.deb msg_ok "Downloaded the latest Intel Processor Microcode Package" @@ -66,7 +66,7 @@ intel() { msg_info "Cleaning up" rm intel-microcode_3.20230512.1_amd64.deb msg_ok "Cleaned" - + echo -e "\n To apply the changes, the system will need to be rebooted.\n" } @@ -82,7 +82,7 @@ amd() { msg_info "Cleaning up" rm amd64-microcode_3.20230719.1_amd64.deb msg_ok "Cleaned" - + echo -e "\n To apply the changes, the system will need to be rebooted.\n" } diff --git a/misc/monitor-all.sh b/misc/monitor-all.sh index 65dbca92..d3a4bed0 100644 --- a/misc/monitor-all.sh +++ b/misc/monitor-all.sh @@ -16,16 +16,16 @@ cat <<"EOF" EOF add() { -while true; do - read -p "This script will add Monitor All to Proxmox VE. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac -done - -echo '#!/usr/bin/env bash + while true; do + read -p "This script will add Monitor All to Proxmox VE. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac + done + + echo '#!/usr/bin/env bash # Read excluded instances from command line arguments excluded_instances=("$@") echo "Excluded instances: ${excluded_instances[@]}" @@ -88,11 +88,11 @@ while true; do sleep 300 done >> /var/log/ping-instances.log 2>&1' >/usr/local/bin/ping-instances.sh -# Change file permissions to executable -chmod +x /usr/local/bin/ping-instances.sh + # Change file permissions to executable + chmod +x /usr/local/bin/ping-instances.sh -# Create ping-instances.service -echo '[Unit] + # Create ping-instances.service + echo '[Unit] Description=Ping instances every 5 minutes and restarts if necessary [Service] @@ -108,11 +108,11 @@ StandardError=file:/var/log/ping-instances.log [Install] WantedBy=multi-user.target' >/etc/systemd/system/ping-instances.service -# Reload daemon, enable and start ping-instances.service -systemctl daemon-reload -systemctl enable -q --now ping-instances.service -clear -echo -e "\n To view Monitor All logs: cat /var/log/ping-instances.log" + # Reload daemon, enable and start ping-instances.service + systemctl daemon-reload + systemctl enable -q --now ping-instances.service + clear + echo -e "\n To view Monitor All logs: cat /var/log/ping-instances.log" } remove() { @@ -125,23 +125,23 @@ remove() { } # Define options for the whiptail menu -OPTIONS=(Add "Add Monitor-All to Proxmox VE" \ - Remove "Remove Monitor-All from Proxmox VE") +OPTIONS=(Add "Add Monitor-All to Proxmox VE" + Remove "Remove Monitor-All from Proxmox VE") # Show the whiptail menu and save the user's choice CHOICE=$(whiptail --title "Monitor-All for Proxmox VE" --menu "Select an option:" 10 58 2 \ - "${OPTIONS[@]}" 3>&1 1>&2 2>&3) + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) # Check the user's choice and perform the corresponding action case $CHOICE in - "Add") - add - ;; - "Remove") - remove - ;; - *) - echo "Exiting..." - exit 0 - ;; +"Add") + add + ;; +"Remove") + remove + ;; +*) + echo "Exiting..." + exit 0 + ;; esac diff --git a/misc/olivetin.sh b/misc/olivetin.sh index c8015572..817edaee 100644 --- a/misc/olivetin.sh +++ b/misc/olivetin.sh @@ -6,8 +6,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE function header_info { -clear -cat <<"EOF" + clear + cat <<"EOF" ____ ___ _______ / __ \/ (_) _____/_ __(_)___ / / / / / / | / / _ \/ / / / __ \ @@ -31,12 +31,12 @@ set-e header_info while true; do - read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn - case $yn in - [Yy]*) break ;; - [Nn]*) exit ;; - *) echo "Please answer yes or no." ;; - esac + read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn + case $yn in + [Yy]*) break ;; + [Nn]*) exit ;; + *) echo "Please answer yes or no." ;; + esac done header_info diff --git a/misc/pbs3-upgrade.sh b/misc/pbs3-upgrade.sh index 6b389e97..ff26d9fb 100644 --- a/misc/pbs3-upgrade.sh +++ b/misc/pbs3-upgrade.sh @@ -44,7 +44,6 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } - start_routines() { header_info CHOICE=$(whiptail --title "PBS 2 BACKUP" --menu "\nMake a backup of /etc/proxmox-backup to ensure that in the worst case, any relevant configuration can be recovered?" 14 58 2 \ @@ -164,7 +163,10 @@ while true; do read -p "Start the Update to Proxmox Backup Server 3 Script (y/n)?" yn case $yn in [Yy]*) break ;; - [Nn]*) clear; exit ;; + [Nn]*) + clear + exit + ;; *) echo "Please answer yes or no." ;; esac done diff --git a/misc/post-pbs-install.sh b/misc/post-pbs-install.sh index aebddb14..e47e2cfb 100644 --- a/misc/post-pbs-install.sh +++ b/misc/post-pbs-install.sh @@ -44,7 +44,6 @@ msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } - start_routines() { header_info VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" @@ -171,14 +170,17 @@ while true; do read -p "Start the Proxmox Backup Server Post Install Script (y/n)?" yn case $yn in [Yy]*) break ;; - [Nn]*) clear; exit ;; + [Nn]*) + clear + exit + ;; *) echo "Please answer yes or no." ;; esac done if command -v pveversion >/dev/null 2>&1; then - echo -e "\n🛑 PVE Detected, Wrong Script!\n" - exit 1 + echo -e "\n🛑 PVE Detected, Wrong Script!\n" + exit 1 fi start_routines diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 7b1fcf7c..1cd1197e 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -172,7 +172,7 @@ EOF ;; esac fi - + if systemctl is-active --quiet pve-ha-lrm; then CHOICE=$(whiptail --title "HIGH AVAILABILITY" --menu "If you plan to utilize a single node instead of a clustered environment, you can disable unnecessary high availability (HA) services, thus reclaiming system resources.\n\nIf HA becomes necessary at a later stage, the services can be re-enabled.\n\nDisable high availability?" 18 58 2 \ "yes" " " \ @@ -190,7 +190,7 @@ EOF ;; esac fi - + CHOICE=$(whiptail --title "UPDATE" --menu "\nUpdate Proxmox VE now?" 11 58 2 \ "yes" " " \ "no" " " 3>&2 2>&1 1>&3) @@ -229,7 +229,10 @@ while true; do read -p "Start the Proxmox VE Post Install Script (y/n)?" yn case $yn in [Yy]*) break ;; - [Nn]*) clear; exit ;; + [Nn]*) + clear + exit + ;; *) echo "Please answer yes or no." ;; esac done diff --git a/misc/pve8-upgrade.sh b/misc/pve8-upgrade.sh index 53eff2cc..2281bc6b 100644 --- a/misc/pve8-upgrade.sh +++ b/misc/pve8-upgrade.sh @@ -48,48 +48,48 @@ start_routines() { header_info whiptail --msgbox --title "PVE8 SOURCES" "This will set the correct sources to update and install Proxmox VE 8." 10 58 - msg_info "Changing to Proxmox VE 8 Sources" - cat </etc/apt/sources.list + msg_info "Changing to Proxmox VE 8 Sources" + cat </etc/apt/sources.list deb http://ftp.debian.org/debian bookworm main contrib deb http://ftp.debian.org/debian bookworm-updates main contrib deb http://security.debian.org/debian-security bookworm-security main contrib EOF - msg_ok "Changed to Proxmox VE 8 Sources" + msg_ok "Changed to Proxmox VE 8 Sources" whiptail --msgbox --title "PVE8-ENTERPRISE" "The 'pve-enterprise' repository is only available to users who have purchased a Proxmox VE subscription." 10 58 - msg_info "Disabling 'pve-enterprise' repository" - cat </etc/apt/sources.list.d/pve-enterprise.list + msg_info "Disabling 'pve-enterprise' repository" + cat </etc/apt/sources.list.d/pve-enterprise.list # deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise EOF - msg_ok "Disabled 'pve-enterprise' repository" + msg_ok "Disabled 'pve-enterprise' repository" whiptail --msgbox --title "PVE8-NO-SUBSCRIPTION" "The 'pve-no-subscription' repository provides access to all of the open-source components of Proxmox VE." 10 58 - msg_info "Enabling 'pve-no-subscription' repository" - cat </etc/apt/sources.list.d/pve-install-repo.list + msg_info "Enabling 'pve-no-subscription' repository" + cat </etc/apt/sources.list.d/pve-install-repo.list deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription EOF - msg_ok "Enabled 'pve-no-subscription' repository" + msg_ok "Enabled 'pve-no-subscription' repository" whiptail --msgbox --title "PVE8 CEPH PACKAGE REPOSITORIES" "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories." 10 58 - msg_info "Enabling 'ceph package repositories'" - cat </etc/apt/sources.list.d/ceph.list + msg_info "Enabling 'ceph package repositories'" + cat </etc/apt/sources.list.d/ceph.list # deb http://download.proxmox.com/debian/ceph-quincy bookworm enterprise deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription EOF - msg_ok "Enabled 'ceph package repositories'" + msg_ok "Enabled 'ceph package repositories'" whiptail --msgbox --title "PVE8 TEST" "The 'pvetest' repository can give advanced users access to new features and updates before they are officially released (Disabled)." 10 58 - msg_info "Adding 'pvetest' repository and set disabled" - cat </etc/apt/sources.list.d/pvetest-for-beta.list + msg_info "Adding 'pvetest' repository and set disabled" + cat </etc/apt/sources.list.d/pvetest-for-beta.list # deb http://download.proxmox.com/debian/pve bookworm pvetest EOF - msg_ok "Added 'pvetest' repository" + msg_ok "Added 'pvetest' repository" whiptail --msgbox --title "PVE8 UPDATE" "Updating to Proxmox VE 8" 10 58 - msg_info "Updating to Proxmox VE 8 (Patience)" - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y - msg_ok "Updated to Proxmox VE 8" + msg_info "Updating to Proxmox VE 8 (Patience)" + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y + msg_ok "Updated to Proxmox VE 8" CHOICE=$(whiptail --title "REBOOT" --menu "\nReboot Proxmox VE 8 now? (recommended)" 11 58 2 \ "yes" " " \ @@ -113,7 +113,10 @@ while true; do read -p "Start the Update to Proxmox VE 8 Script (y/n)?" yn case $yn in [Yy]*) break ;; - [Nn]*) clear; exit ;; + [Nn]*) + clear + exit + ;; *) echo "Please answer yes or no." ;; esac done diff --git a/misc/pyenv.sh b/misc/pyenv.sh index 675a0344..19740ad0 100644 --- a/misc/pyenv.sh +++ b/misc/pyenv.sh @@ -28,7 +28,10 @@ function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } -if command -v pveversion >/dev/null 2>&1; then msg_error "Can't Install on Proxmox "; exit; fi +if command -v pveversion >/dev/null 2>&1; then + msg_error "Can't Install on Proxmox " + exit +fi msg_info "Installing pyenv" apt-get install -y \ make \ @@ -58,9 +61,9 @@ apt-get install -y \ git clone https://github.com/pyenv/pyenv.git ~/.pyenv &>/dev/null set +e -echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc -echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc -echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.bashrc +echo 'export PYENV_ROOT="$HOME/.pyenv"' >>~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >>~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >>~/.bashrc msg_ok "Installed pyenv" . ~/.bashrc set -e @@ -70,8 +73,8 @@ pyenv global 3.11.1 msg_ok "Installed Python 3.11.1" read -r -p "Would you like to install Home Assistant Beta? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Installing Home Assistant Beta" -cat </etc/systemd/system/homeassistant.service + msg_info "Installing Home Assistant Beta" + cat </etc/systemd/system/homeassistant.service [Unit] Description=Home Assistant After=network-online.target @@ -83,31 +86,31 @@ RestartForceExitStatus=100 [Install] WantedBy=multi-user.target EOF -mkdir /srv/homeassistant -cd /srv/homeassistant -python3 -m venv . -source bin/activate -python3 -m pip install wheel &>/dev/null -pip3 install --upgrade pip &>/dev/null -pip3 install psycopg2-binary &>/dev/null -pip3 install --pre homeassistant &>/dev/null -systemctl enable homeassistant &>/dev/null -msg_ok "Installed Home Assistant Beta" -echo -e " Go to $(hostname -I | awk '{print $1}'):8123" -hass + mkdir /srv/homeassistant + cd /srv/homeassistant + python3 -m venv . + source bin/activate + python3 -m pip install wheel &>/dev/null + pip3 install --upgrade pip &>/dev/null + pip3 install psycopg2-binary &>/dev/null + pip3 install --pre homeassistant &>/dev/null + systemctl enable homeassistant &>/dev/null + msg_ok "Installed Home Assistant Beta" + echo -e " Go to $(hostname -I | awk '{print $1}'):8123" + hass fi read -r -p "Would you like to install ESPHome Beta? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Installing ESPHome Beta" -mkdir /srv/esphome -cd /srv/esphome -python3 -m venv . -source bin/activate -python3 -m pip install wheel &>/dev/null -pip3 install --upgrade pip &>/dev/null -pip3 install --pre esphome &>/dev/null -cat </srv/esphome/start.sh + msg_info "Installing ESPHome Beta" + mkdir /srv/esphome + cd /srv/esphome + python3 -m venv . + source bin/activate + python3 -m pip install wheel &>/dev/null + pip3 install --upgrade pip &>/dev/null + pip3 install --pre esphome &>/dev/null + cat </srv/esphome/start.sh #!/usr/bin/env bash # Copyright (c) 2021-2023 tteck @@ -118,8 +121,8 @@ cat </srv/esphome/start.sh source /srv/esphome/bin/activate esphome dashboard /srv/esphome/ EOF -chmod +x start.sh -cat </etc/systemd/system/esphomedashboard.service + chmod +x start.sh + cat </etc/systemd/system/esphomedashboard.service [Unit] Description=ESPHome Dashboard Service After=network.target @@ -133,27 +136,27 @@ Restart=on-failure [Install] WantedBy=multi-user.target EOF -systemctl enable --now esphomedashboard &>/dev/null -msg_ok "Installed ESPHome Beta" -echo -e " Go to $(hostname -I | awk '{print $1}'):6052" -exec $SHELL + systemctl enable --now esphomedashboard &>/dev/null + msg_ok "Installed ESPHome Beta" + echo -e " Go to $(hostname -I | awk '{print $1}'):6052" + exec $SHELL fi read -r -p "Would you like to install Matter-Server (Beta)? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then -msg_info "Installing Matter Server" -apt-get install -y \ -libcairo2-dev \ -libjpeg62-turbo-dev \ -libgirepository1.0-dev \ -libpango1.0-dev \ -libgif-dev \ -g++ &>/dev/null -python3 -m pip install wheel -pip3 install --upgrade pip -pip install python-matter-server[server] -msg_ok "Installed Matter Server" -echo -e "Start server > python -m matter_server.server" + msg_info "Installing Matter Server" + apt-get install -y \ + libcairo2-dev \ + libjpeg62-turbo-dev \ + libgirepository1.0-dev \ + libpango1.0-dev \ + libgif-dev \ + g++ &>/dev/null + python3 -m pip install wheel + pip3 install --upgrade pip + pip install python-matter-server[server] + msg_ok "Installed Matter Server" + echo -e "Start server > python -m matter_server.server" fi msg_ok "\nFinished\n" exec $SHELL diff --git a/misc/scaling-governor.sh b/misc/scaling-governor.sh index 20138b08..50bfbd0b 100644 --- a/misc/scaling-governor.sh +++ b/misc/scaling-governor.sh @@ -6,8 +6,8 @@ # https://github.com/tteck/Proxmox/raw/main/LICENSE header_info() { -clear -cat </dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; + alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;; + archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;; + fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;; + ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable && apt-get -y dist-upgrade" ;; esac } header_info