Skip to content

Commit

Permalink
Massive Update (Remove StorageCheck (old) + Add Ressource & StorageCh…
Browse files Browse the repository at this point in the history
…eck, Remove Whiptail, Remove PCT Ressource Set (#333)

* Massive Update (Remove StorageCheck (old) + Add Ressource & StorageCheck, Remove Whiptail, Remove PCT Ressource Set

* Update calibre-web.sh

* Update cockpit.sh

* Update cronicle.sh

* Update homeassistant-core.sh

* Update podman-homeassistant.sh

* Update node-red.sh

* Update plex.sh

* Update wallos.sh

* Revert "Update wallos.sh"

This reverts commit ea6311e.

* Update homeassistant.sh

* Update ct/cronicle.sh

Co-authored-by: Håvard Gjøby Thom <[email protected]>

---------

Co-authored-by: Håvard Gjøby Thom <[email protected]>
  • Loading branch information
MickLesk and havardthom authored Nov 18, 2024
1 parent d84cf6e commit ad18c05
Show file tree
Hide file tree
Showing 172 changed files with 356 additions and 135 deletions.
8 changes: 3 additions & 5 deletions ct/actualbudget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/actualbudget ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75
msg_info "Updating ${APP}"
systemctl stop actualbudget.service
cd /opt/actualbudget
Expand All @@ -69,10 +70,7 @@ exit
start
build_container
description
msg_info "Setting Container to Normal Resources"
pct set $CTID -memory 1024
pct set $CTID -cores 1
msg_ok "Set Container to Normal Resources"

msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:5006${CL} \n"
2 changes: 2 additions & 0 deletions ct/adguard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {
}
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "Adguard Home should be updated via the user interface."
exit
Expand Down
6 changes: 2 additions & 4 deletions ct/adventurelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ function default_settings() {
}
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/adventurelog ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
fi
RELEASE=$(curl -s https://api.github.com/repos/seanmorley15/AdventureLog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Services"
Expand Down
2 changes: 2 additions & 0 deletions ct/agentdvr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/agentdvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."
exit
Expand Down
2 changes: 2 additions & 0 deletions ct/apache-cassandra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/cassandra.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."
exit
Expand Down
2 changes: 2 additions & 0 deletions ct/apache-couchdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/couchdb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."
exit
Expand Down
2 changes: 2 additions & 0 deletions ct/apt-cacher-ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
6 changes: 2 additions & 4 deletions ct/archivebox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/archivebox ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
fi
msg_info "Stopping ${APP}"
systemctl stop archivebox
msg_ok "Stopped ${APP}"
Expand Down
2 changes: 2 additions & 0 deletions ct/aria2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/audiobookshelf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
echo "This application receives updates through the APT package manager."
exit
Expand Down
2 changes: 2 additions & 0 deletions ct/autobrr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
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
Expand Down
2 changes: 2 additions & 0 deletions ct/bazarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var/lib/bazarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/blocky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
6 changes: 2 additions & 4 deletions ct/bookstack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/bookstack ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
fi
RELEASE=$(curl -s https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Apache2"
Expand Down
2 changes: 2 additions & 0 deletions ct/bunkerweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /etc/bunkerweb ]]; then msg_error "No ${APP} Installation Found!"; exit; fi

RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
Expand Down
2 changes: 2 additions & 0 deletions ct/caddy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /etc/caddy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
9 changes: 3 additions & 6 deletions ct/calibre-web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ function default_settings() {
}

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/cps.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75
header_info
msg_info "Updating $APP LXC"
systemctl stop cps
cd /opt/kepubify
Expand Down Expand Up @@ -156,10 +157,6 @@ start
build_container
description

msg_info "Setting Container to Normal Resources"
pct set $CTID -memory 512
pct set $CTID -cores 1
msg_ok "Set Container to Normal Resources"
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:8083${CL} \n"
2 changes: 2 additions & 0 deletions ct/casaos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP} LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/changedetection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP} LXC"
if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then
Expand Down
2 changes: 2 additions & 0 deletions ct/channels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/channels-dvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."
exit
Expand Down
2 changes: 2 additions & 0 deletions ct/cloudflared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
4 changes: 3 additions & 1 deletion ct/cockpit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ function default_settings() {
}

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /etc/cockpit ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
"1" "Update LXC" ON \
Expand All @@ -62,7 +65,6 @@ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radio
"4" "Install cockpit-navigator" OFF \
3>&1 1>&2 2>&3)

header_info
if [ "$UPD" == "1" ]; then
msg_info "Updating ${APP} LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/commafeed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/commafeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
RELEASE=$(curl -sL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
Expand Down
4 changes: 3 additions & 1 deletion ct/cronicle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ function default_settings() {
}

function update_script() {
header_info
check_container_storage
check_container_resources
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --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
if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then
if ! command -v npm >/dev/null 2>&1; then
Expand Down
2 changes: 2 additions & 0 deletions ct/daemonsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/dashy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/dashy/public/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi

RELEASE=$(curl -sL https://api.github.com/repos/Lissy93/dashy/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
Expand Down
2 changes: 2 additions & 0 deletions ct/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/deconz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
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
Expand Down
2 changes: 2 additions & 0 deletions ct/deluge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
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
Expand Down
2 changes: 2 additions & 0 deletions ct/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP} LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/dockge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/dockge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP}"
cd /opt/dockge
Expand Down
2 changes: 2 additions & 0 deletions ct/emby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
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}"
Expand Down
2 changes: 2 additions & 0 deletions ct/emqx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/ersatztv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function default_settings() {
}
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/ErsatzTV ]]; then msg_error "No ${APP} Installation Found!"; exit; fi

msg_info "Stopping ErsatzTV"
Expand Down
2 changes: 2 additions & 0 deletions ct/esphome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Stopping ESPHome"
systemctl stop esphomeDashboard
Expand Down
2 changes: 2 additions & 0 deletions ct/evcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/apt/sources.list.d/evcc-stable.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating evcc LXC"
apt update &>/dev/null
Expand Down
2 changes: 2 additions & 0 deletions ct/fenrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ function default_settings() {

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/${APP} ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."
exit
Expand Down
Loading

0 comments on commit ad18c05

Please sign in to comment.