From 8847505782c999f152814fde1090bd95f341f672 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 10:30:50 -0400 Subject: [PATCH 01/46] Update jellyseerr.sh increase build resources --- ct/jellyseerr.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 5f3548bf5..8c35ecd3b 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -20,8 +20,8 @@ header_info echo -e "Loading..." APP="Jellyseerr" var_disk="8" -var_cpu="2" -var_ram="2048" +var_cpu="4" +var_ram="4096" var_os="debian" var_version="12" variables @@ -77,6 +77,11 @@ start build_container description +msg_info "Setting Container to Normal Resources" +pct set $CTID -memory 2048 +pct set $CTID -cores 2 +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}:5055${CL} \n" From 221ed9d2603c40e5c5b4de5ed28a3fb09350796f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 10:33:45 -0400 Subject: [PATCH 02/46] Update jellyseerr-install.sh - refactor code to utilize `pnpm` - fixes https://github.com/tteck/Proxmox/issues/3904 --- install/jellyseerr-install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 38ae8b22d..5905d7401 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -18,8 +18,7 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y git -$STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -33,17 +32,18 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Installing Yarn" -$STD npm install -g yarn -msg_ok "Installed Yarn" +msg_info "Installing pnpm" +$STD npm install -g pnpm +msg_ok "Installed pnpm" msg_info "Installing Jellyseerr (Patience)" git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr cd /opt/jellyseerr $STD git checkout main -CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile --network-timeout 1000000 &>/dev/null -$STD yarn install -$STD yarn build +export CYPRESS_INSTALL_BINARY=0 +$STD pnpm install --frozen-lockfile +export NODE_OPTIONS="--max-old-space-size=3072" +$STD pnpm build mkdir -p /etc/jellyseerr/ cat </etc/jellyseerr/jellyseerr.conf PORT=5055 @@ -63,7 +63,7 @@ EnvironmentFile=/etc/jellyseerr/jellyseerr.conf Environment=NODE_ENV=production Type=exec WorkingDirectory=/opt/jellyseerr -ExecStart=/usr/bin/yarn start +ExecStart=/usr/bin/node dist/index.js [Install] WantedBy=multi-user.target From 7e061a112ffe58fa1feee467352da753bccefef6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 10:55:49 -0400 Subject: [PATCH 03/46] Update jellyseerr.sh refactor update function --- ct/jellyseerr.sh | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 8c35ecd3b..e3fd17553 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -55,6 +55,13 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/jellyseerr ]]; 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 Jellyseerr LXC to 4vcpu and 4096RAM for the build process before continuing" 10 75 +if ! command -v pnpm &> /dev/null; then + msg_error "pnpm not found. Installing..." + npm install -g pnpm &>/dev/null +else + msg_info "pnpm is already installed." +fi msg_info "Updating $APP" systemctl stop jellyseerr cd /opt/jellyseerr @@ -66,8 +73,25 @@ then systemctl start jellyseerr exit fi -CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile --network-timeout 1000000 &>/dev/null -yarn build &>/dev/null +export CYPRESS_INSTALL_BINARY=0 +pnpm install --frozen-lockfile &>/dev/null +export NODE_OPTIONS="--max-old-space-size=3072" +pnpm build &>/dev/null +cat </etc/systemd/system/jellyseerr.service +[Unit] +Description=jellyseerr Service +After=network.target + +[Service] +EnvironmentFile=/etc/jellyseerr/jellyseerr.conf +Environment=NODE_ENV=production +Type=exec +WorkingDirectory=/opt/jellyseerr +ExecStart=/usr/bin/node dist/index.js + +[Install] +WantedBy=multi-user.target +EOF systemctl start jellyseerr msg_ok "Updated $APP" exit From d442fa49f5cb3be1aa7044223f7eec219248c373 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 10:57:23 -0400 Subject: [PATCH 04/46] Update jellyseerr.sh --- ct/jellyseerr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index e3fd17553..be78d9094 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -68,6 +68,7 @@ cd /opt/jellyseerr output=$(git pull) git pull &>/dev/null if echo "$output" | grep -q "Already up to date." +msg_ok then msg_ok " $APP is already up to date." systemctl start jellyseerr From e3160b56af4d27027576e309ca87d71a5943ea0f Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 11:03:01 -0400 Subject: [PATCH 05/46] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index be78d9094..498019b15 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -68,9 +68,9 @@ cd /opt/jellyseerr output=$(git pull) git pull &>/dev/null if echo "$output" | grep -q "Already up to date." -msg_ok then msg_ok " $APP is already up to date." + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi systemctl start jellyseerr exit fi From b323313d6e83c94747049bbd0aba55f7ba4fe81b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 11:05:50 -0400 Subject: [PATCH 06/46] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 498019b15..4c6d1cf64 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -60,7 +60,7 @@ if ! command -v pnpm &> /dev/null; then msg_error "pnpm not found. Installing..." npm install -g pnpm &>/dev/null else - msg_info "pnpm is already installed." + msg_ok "pnpm is already installed." fi msg_info "Updating $APP" systemctl stop jellyseerr @@ -70,7 +70,6 @@ git pull &>/dev/null if echo "$output" | grep -q "Already up to date." then msg_ok " $APP is already up to date." - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi systemctl start jellyseerr exit fi From b7baf2d1ed51efcd27dc82710666e0cc540ef851 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 11:18:05 -0400 Subject: [PATCH 07/46] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 4c6d1cf64..30aa8539c 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -69,7 +69,7 @@ output=$(git pull) git pull &>/dev/null if echo "$output" | grep -q "Already up to date." then - msg_ok " $APP is already up to date." + msg_ok "$APP is already up to date." systemctl start jellyseerr exit fi From 0618c89147314b04b4d345effc70b5d39fec0094 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 12:47:01 -0400 Subject: [PATCH 08/46] Update evcc.sh change upgrade command --- ct/evcc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/evcc.sh b/ct/evcc.sh index a5aae019a..c0e8ed617 100644 --- a/ct/evcc.sh +++ b/ct/evcc.sh @@ -56,7 +56,7 @@ header_info 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 -apt install -y evcc &>/dev/null +apt --only-upgrade install -y evcc &>/dev/null msg_ok "Updated Successfully" exit } From 11c5f518a027d7dddbb609b0b1a0e5a33c63470b Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Oct 2024 23:29:32 -0400 Subject: [PATCH 09/46] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 30aa8539c..3dfa4e72b 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -92,6 +92,7 @@ ExecStart=/usr/bin/node dist/index.js [Install] WantedBy=multi-user.target EOF +systemctl daemon-reload systemctl start jellyseerr msg_ok "Updated $APP" exit From 6e7b5d80220d77f94d410b7a537234a0da7d536e Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 17 Oct 2024 04:27:26 -0400 Subject: [PATCH 10/46] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 3dfa4e72b..d35313948 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -63,16 +63,15 @@ else msg_ok "pnpm is already installed." fi msg_info "Updating $APP" -systemctl stop jellyseerr cd /opt/jellyseerr -output=$(git pull) -git pull &>/dev/null +output=$(git pull --no-rebase) if echo "$output" | grep -q "Already up to date." then msg_ok "$APP is already up to date." - systemctl start jellyseerr exit fi +systemctl stop jellyseerr +git pull --no-rebase &>/dev/null export CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile &>/dev/null export NODE_OPTIONS="--max-old-space-size=3072" From 0665e77a1c4f48aec7de129b6c806eac284d79d0 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 17 Oct 2024 05:15:34 -0400 Subject: [PATCH 11/46] Update jellyseerr.sh more tweaks --- ct/jellyseerr.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index d35313948..ba7dd6606 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -64,14 +64,13 @@ else fi msg_info "Updating $APP" cd /opt/jellyseerr -output=$(git pull --no-rebase) +output=$(git pull --no-rebase &>/dev/null) if echo "$output" | grep -q "Already up to date." then msg_ok "$APP is already up to date." exit fi systemctl stop jellyseerr -git pull --no-rebase &>/dev/null export CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile &>/dev/null export NODE_OPTIONS="--max-old-space-size=3072" From badff00ee2d61426096b53e9bffab6defee85072 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 17 Oct 2024 05:30:29 -0400 Subject: [PATCH 12/46] Update jellyseerr.sh add low storage check --- ct/jellyseerr.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index ba7dd6606..20c63bc15 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -55,6 +55,10 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/jellyseerr ]]; 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? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your Jellyseerr LXC to 4vcpu and 4096RAM for the build process before continuing" 10 75 if ! command -v pnpm &> /dev/null; then msg_error "pnpm not found. Installing..." From 22e7ff1f175f9f7c6bfa1ea0221d4ec0e04d2afa Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 17 Oct 2024 05:40:01 -0400 Subject: [PATCH 13/46] Update jellyseerr.sh tweak --- ct/jellyseerr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 20c63bc15..930b6652f 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -68,7 +68,7 @@ else fi msg_info "Updating $APP" cd /opt/jellyseerr -output=$(git pull --no-rebase &>/dev/null) +output=$(git pull --no-rebase) if echo "$output" | grep -q "Already up to date." then msg_ok "$APP is already up to date." From 3237e6aced13f6704c0d705e529a074d3091a9dc Mon Sep 17 00:00:00 2001 From: "T. H." Date: Fri, 18 Oct 2024 13:06:17 +0200 Subject: [PATCH 14/46] Add new LXC: Kibana (#3920) --- ct/kibana.sh | 79 +++++++++++++++++++++++++++++++++++++ install/kibana-install.sh | 82 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 ct/kibana.sh create mode 100644 install/kibana-install.sh diff --git a/ct/kibana.sh b/ct/kibana.sh new file mode 100644 index 000000000..465c78298 --- /dev/null +++ b/ct/kibana.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: T.H. (ELKozel) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ __ _ __ + / //_/(_) /_ ____ _____ ____ _ + / ,< / / __ \/ __ `/ __ \/ __ `/ + / /| |/ / /_/ / /_/ / / / / /_/ / +/_/ |_/_/_.___/\__,_/_/ /_/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Kibana" +var_disk="6" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /etc/systemd/system/Kibana.service ]]; 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? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi + +msg_info "Updating ${APP} LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated ${APP} LXC" + +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:5601${CL}\n" diff --git a/install/kibana-install.sh b/install/kibana-install.sh new file mode 100644 index 000000000..9a1f1950d --- /dev/null +++ b/install/kibana-install.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck (tteckster) +# Co-Author: T.H. (ELKozel) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +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 apt-transport-https +$STD apt-get install -y gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up Elastic Repository" +wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" >/etc/apt/sources.list.d/elastic-8.x.list +msg_ok "Set up Elastic Repository" + +msg_info "Installing Kibana" +$STD apt-get update +$STD apt-get install -y kibana +echo 'export PATH=/usr/share/kibana/bin:$PATH' >>~/.bashrc +export PATH=/usr/share/kibana/bin:$PATH +sed -i -E "s/#server.host: \"localhost\"/server.host: \"0.0.0.0\"/" /etc/kibana/kibana.yml +msg_ok "Installed Kibana" + +msg_info "Creating Service" +cat </etc/systemd/system/Kibana.service +[Unit] +Description=Kibana +Documentation=https://www.elastic.co/guide/en/kibana/8.15/index.html +Wants=network-online.target +After=network-online.target +[Service] +Type=simple +User=kibana +Group=kibana +PrivateTmp=true + +Environment=KBN_HOME=/usr/share/kibana +Environment=KBN_PATH_CONF=/etc/kibana + +EnvironmentFile=-/etc/default/kibana +EnvironmentFile=-/etc/sysconfig/kibana + +ExecStart=/usr/share/kibana/bin/kibana + +Restart=on-failure +RestartSec=3 + +StartLimitBurst=3 +StartLimitInterval=60 + +WorkingDirectory=/usr/share/kibana + +StandardOutput=journal +StandardError=inherit + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now Kibana.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From e377e065a4f58c8987e1d79250b1c919f63fc853 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 18 Oct 2024 08:30:12 -0400 Subject: [PATCH 15/46] Revert "Add new LXC: Kibana (#3920)" (#3922) This reverts commit 3237e6aced13f6704c0d705e529a074d3091a9dc. --- ct/kibana.sh | 79 ------------------------------------- install/kibana-install.sh | 82 --------------------------------------- 2 files changed, 161 deletions(-) delete mode 100644 ct/kibana.sh delete mode 100644 install/kibana-install.sh diff --git a/ct/kibana.sh b/ct/kibana.sh deleted file mode 100644 index 465c78298..000000000 --- a/ct/kibana.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# Co-Author: T.H. (ELKozel) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -function header_info { -clear -cat <<"EOF" - __ __ _ __ - / //_/(_) /_ ____ _____ ____ _ - / ,< / / __ \/ __ `/ __ \/ __ `/ - / /| |/ / /_/ / /_/ / / / / /_/ / -/_/ |_/_/_.___/\__,_/_/ /_/\__,_/ - -EOF -} -header_info -echo -e "Loading..." -APP="Kibana" -var_disk="6" -var_cpu="2" -var_ram="2048" -var_os="debian" -var_version="12" -variables -color -catch_errors - -function default_settings() { - CT_TYPE="1" - PW="" - CT_ID=$NEXTID - HN=$NSAPP - DISK_SIZE="$var_disk" - CORE_COUNT="$var_cpu" - RAM_SIZE="$var_ram" - BRG="vmbr0" - NET="dhcp" - GATE="" - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - echo_default -} - -function update_script() { -header_info -if [[ ! -f /etc/systemd/system/Kibana.service ]]; 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? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi - -msg_info "Updating ${APP} LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated ${APP} LXC" - -msg_ok "Updated Successfully" -exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:5601${CL}\n" diff --git a/install/kibana-install.sh b/install/kibana-install.sh deleted file mode 100644 index 9a1f1950d..000000000 --- a/install/kibana-install.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# Co-Author: T.H. (ELKozel) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE - -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -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 apt-transport-https -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting up Elastic Repository" -wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg -echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" >/etc/apt/sources.list.d/elastic-8.x.list -msg_ok "Set up Elastic Repository" - -msg_info "Installing Kibana" -$STD apt-get update -$STD apt-get install -y kibana -echo 'export PATH=/usr/share/kibana/bin:$PATH' >>~/.bashrc -export PATH=/usr/share/kibana/bin:$PATH -sed -i -E "s/#server.host: \"localhost\"/server.host: \"0.0.0.0\"/" /etc/kibana/kibana.yml -msg_ok "Installed Kibana" - -msg_info "Creating Service" -cat </etc/systemd/system/Kibana.service -[Unit] -Description=Kibana -Documentation=https://www.elastic.co/guide/en/kibana/8.15/index.html -Wants=network-online.target -After=network-online.target -[Service] -Type=simple -User=kibana -Group=kibana -PrivateTmp=true - -Environment=KBN_HOME=/usr/share/kibana -Environment=KBN_PATH_CONF=/etc/kibana - -EnvironmentFile=-/etc/default/kibana -EnvironmentFile=-/etc/sysconfig/kibana - -ExecStart=/usr/share/kibana/bin/kibana - -Restart=on-failure -RestartSec=3 - -StartLimitBurst=3 -StartLimitInterval=60 - -WorkingDirectory=/usr/share/kibana - -StandardOutput=journal -StandardError=inherit - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now Kibana.service -msg_ok "Created Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" From 23b391b21d2629fb5e5766ac14a192013ccfb1a6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 18 Oct 2024 09:42:23 -0400 Subject: [PATCH 16/46] Create archivebox.sh --- ct/archivebox.sh | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 ct/archivebox.sh diff --git a/ct/archivebox.sh b/ct/archivebox.sh new file mode 100644 index 000000000..f6acfbed4 --- /dev/null +++ b/ct/archivebox.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ _ ____ + / | __________/ /_ (_) _____ / __ )____ _ __ + / /| | / ___/ ___/ __ \/ / | / / _ \/ __ / __ \| |/_/ + / ___ |/ / / /__/ / / / /| |/ / __/ /_/ / /_/ /> < +/_/ |_/_/ \___/_/ /_/_/ |___/\___/_____/\____/_/|_| + +EOF +} +header_info +echo -e "Loading..." +APP="ArchiveBox" +var_disk="8" +var_cpu="2" +var_ram="1024" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +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? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +msg_info "Stopping ${APP}" +systemctl stop archivebox +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +cd /opt/archivebox/data +pip install --upgrade --ignore-installed archivebox +sudo -u archivebox archivebox init +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl start archivebox +msg_ok "Started ${APP}" + +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:8000/admin/login${CL} \n" From e705fb68051bc98bfe12643accd1cf2c850a3987 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 18 Oct 2024 09:43:42 -0400 Subject: [PATCH 17/46] Create archivebox-install.sh --- install/archivebox-install.sh | 108 ++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 install/archivebox-install.sh diff --git a/install/archivebox-install.sh b/install/archivebox-install.sh new file mode 100644 index 000000000..df9e0967e --- /dev/null +++ b/install/archivebox-install.sh @@ -0,0 +1,108 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + expect \ + libssl-dev \ + libldap2-dev \ + libsasl2-dev \ + procps \ + dnsutils \ + ripgrep +msg_ok "Installed Dependencies" + +msg_info "Installing Python Dependencies" +$STD apt-get install -y \ + python3-pip \ + python3-ldap \ + python3-msgpack \ + python3-regex +msg_ok "Installed Python Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing Playright/Chromium" +$STD pip install playwright +$STD playwright install --with-deps chromium +msg_ok "Installed Playright/Chromium" + +msg_info "Installing ArchiveBox" +mkdir -p /opt/archivebox/{data,.npm,.cache,.local} +$STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password archivebox +chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local} +chmod -R 755 /opt/archivebox/data +$STD pip install archivebox +cd /opt/archivebox/data +expect </etc/systemd/system/archivebox.service +[Unit] +Description=ArchiveBox Server +After=network.target + +[Service] +User=archivebox +WorkingDirectory=/opt/archivebox/data +ExecStart=/usr/local/bin/archivebox server 0.0.0.0:8000 +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now archivebox.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 6ead7e1e5fe76fe5adda7cab4979b683d9a82ec6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 18 Oct 2024 09:50:13 -0400 Subject: [PATCH 18/46] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0eb367c..6d8f18733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2024-10-18 + +### Changed + +- **ArchiveBox LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/archivebox-install.sh) + - NEW Script + ## 2024-10-15 ### Changed From 7ae803092ed71de7db1b327cf9d55628844d1633 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 18 Oct 2024 11:24:40 -0400 Subject: [PATCH 19/46] Update archivebox.sh tweak --- ct/archivebox.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/archivebox.sh b/ct/archivebox.sh index f6acfbed4..9b058660c 100644 --- a/ct/archivebox.sh +++ b/ct/archivebox.sh @@ -8,12 +8,12 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build function header_info { clear cat <<"EOF" - ___ __ _ ____ + ___ __ _ ____ / | __________/ /_ (_) _____ / __ )____ _ __ / /| | / ___/ ___/ __ \/ / | / / _ \/ __ / __ \| |/_/ - / ___ |/ / / /__/ / / / /| |/ / __/ /_/ / /_/ /> < -/_/ |_/_/ \___/_/ /_/_/ |___/\___/_____/\____/_/|_| - + / ___ |/ / / /__/ / / / /| |/ / __/ /_/ / /_/ /> < +/_/ |_/_/ \___/_/ /_/_/ |___/\___/_____/\____/_/|_| + EOF } header_info From 3e2dc1cc1cfbd2fb3ff0002d4ddd7c3396ae1c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:21:51 +0200 Subject: [PATCH 20/46] Add new LXC: Cockpit (#3925) --- ct/cockpit.sh | 125 +++++++++++++++++++++++++++++++++++++ install/cockpit-install.sh | 35 +++++++++++ 2 files changed, 160 insertions(+) create mode 100644 ct/cockpit.sh create mode 100644 install/cockpit-install.sh diff --git a/ct/cockpit.sh b/ct/cockpit.sh new file mode 100644 index 000000000..c38adaea7 --- /dev/null +++ b/ct/cockpit.sh @@ -0,0 +1,125 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ______ __ _ __ + / ____/___ _____/ /______ (_) /_ + / / / __ \/ ___/ //_/ __ \/ / __/ +/ /___/ /_/ / /__/ ,< / /_/ / / /_ +\____/\____/\___/_/|_/ .___/_/\__/ + /_/ +EOF +} +header_info +echo -e "Loading..." +APP="Cockpit" +var_disk="2" +var_cpu="1" +var_ram="512" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +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 \ + "2" "Install cockpit-file-sharing" OFF \ + "3" "Install cockpit-identities" OFF \ + "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 + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP} LXC" + exit +fi +if [ "$UPD" == "2" ]; then + msg_info "Installing dependencies (patience)" + apt-get install -y attr &>/dev/null + apt-get install -y nfs-kernel-server &>/dev/null + apt-get install -y samba &>/dev/null + apt-get install -y samba-common-bin &>/dev/null + apt-get install -y winbind &>/dev/null + apt-get install -y gawk &>/dev/null + msg_ok "Installed dependencies" + msg_info "Installing Cockpit file sharing" + LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-file-sharing/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + wget -q https://github.com/45Drives/cockpit-file-sharing/releases/download/v${LATEST}/cockpit-file-sharing_${LATEST}-1focal_all.deb + dpkg -i cockpit-file-sharing_${LATEST}-1focal_all.deb &>/dev/null + rm cockpit-file-sharing_${LATEST}-1focal_all.deb + msg_ok "Installed Cockpit file sharing" + exit +fi +if [ "$UPD" == "3" ]; then + msg_info "Installing dependencies (patience)" + apt-get install -y psmisc &>/dev/null + apt-get install -y samba &>/dev/null + apt-get install -y samba-common-bin &>/dev/null + msg_ok "Installed dependencies" + msg_info "Installing Cockpit identities" + LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-identities/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + wget -q https://github.com/45Drives/cockpit-identities/releases/download/v${LATEST}/cockpit-identities_${LATEST}-1focal_all.deb + dpkg -i cockpit-identities_${LATEST}-1focal_all.deb &>/dev/null + rm cockpit-identities_${LATEST}-1focal_all.deb + msg_ok "Installed Cockpit identities" + exit +fi +if [ "$UPD" == "4" ]; then + msg_info "Installing dependencies" + apt-get install -y rsync &>/dev/null + apt-get install -y zip &>/dev/null + msg_ok "Installed dependencies" + msg_info "Installing Cockpit navigator" + LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-navigator/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + wget -q https://github.com/45Drives/cockpit-navigator/releases/download/v${LATEST}/cockpit-navigator_${LATEST}-1focal_all.deb + dpkg -i cockpit-navigator_${LATEST}-1focal_all.deb &>/dev/null + rm cockpit-navigator_${LATEST}-1focal_all.deb + msg_ok "Installed Cockpit navigator" + exit +fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9090${CL} \n" diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh new file mode 100644 index 000000000..a5dfbc207 --- /dev/null +++ b/install/cockpit-install.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/cockpit-project/cockpit + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +msg_ok "Installed Dependencies" + +msg_info "Installing Cockpit" +$STD apt install -y cockpit --no-install-recommends +sed -i "s/root//g" /etc/cockpit/disallowed-users +msg_ok "Installed Cockpit" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 32c24f69a7ea22b9b5854ed9c9203e77ef030deb Mon Sep 17 00:00:00 2001 From: Jacob <630000+stickpin@users.noreply.github.com> Date: Sat, 19 Oct 2024 01:10:16 +0200 Subject: [PATCH 21/46] Fix changedetection install script to support Browserless v2.x (#3928) --- install/changedetection-install.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index ab799611c..9617d07ea 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -76,7 +76,9 @@ mkdir /opt/browserless $STD python3 -m pip install playwright $STD git clone https://github.com/browserless/chrome /opt/browserless $STD npm install --prefix /opt/browserless +$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps chrome chromium firefox webkit $STD npm run build --prefix /opt/browserless +$STD npm run build:function --prefix /opt/browserless $STD npm prune production --prefix /opt/browserless msg_ok "Installed Browserless & Playwright" @@ -124,7 +126,7 @@ Wants=browserless.service Type=simple WorkingDirectory=/opt/changedetection Environment=WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub -Environment=PLAYWRIGHT_DRIVER_URL=ws://browserless-chrome:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true +Environment=PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true ExecStart=changedetection.io -d /opt/changedetection -p 5000 [Install] WantedBy=multi-user.target @@ -135,14 +137,6 @@ cat </etc/systemd/system/browserless.service Description=browserless service After=network.target [Service] -Environment=APP_DIR=/opt/browserless -Environment=PLAYWRIGHT_BROWSERS_PATH=/opt/browserless -Environment=CONNECTION_TIMEOUT=60000 -Environment=HOST=127.0.0.1 -Environment=LANG="C.UTF-8" -Environment=NODE_ENV=production -Environment=PORT=3000 -Environment=WORKSPACE_DIR=/opt/browserless/workspace WorkingDirectory=/opt/browserless ExecStart=/opt/browserless/scripts/start.sh SyslogIdentifier=browserless From 1ec52d08a3a7a5bf7de312f0b8a2abcdf91e1264 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 18 Oct 2024 22:24:27 -0400 Subject: [PATCH 22/46] Update changeme to helper-scripts.com --- ct/homeassistant-core.sh | 4 ++-- ct/homeassistant.sh | 4 ++-- ct/podman-homeassistant.sh | 4 ++-- install/photoprism-install.sh | 2 +- misc/filebrowser.sh | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 96f26a856..8a659ea4b 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -121,7 +121,7 @@ function update_script() { else 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 + filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null fi msg_ok "Installed FileBrowser" @@ -142,7 +142,7 @@ WantedBy=default.target" >$service_path 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" + ${BL}http://$IP:8080${CL} admin|helper-scripts.com\n" exit fi } diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 3f2c63edb..425f1f2db 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -105,7 +105,7 @@ function update_script() { curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/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 + filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null msg_ok "Installed FileBrowser" msg_info "Creating Service" @@ -125,7 +125,7 @@ WantedBy=default.target" >$service_path 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" + ${BL}http://$IP:8080${CL} admin|helper-scripts.com\n" exit fi } diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 1f02fe7f9..779ea1ccd 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -102,7 +102,7 @@ if [ "$UPD" == "3" ]; then 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 + filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null msg_ok "Installed FileBrowser" msg_info "Creating Service" @@ -122,7 +122,7 @@ 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" + ${BL}http://$IP:8080${CL} admin|helper-scripts.com\n" exit fi if [ "$UPD" == "4" ]; then diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 8e0df7abe..e88d16618 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -43,7 +43,7 @@ fi ldconfig cat </opt/photoprism/config/.env PHOTOPRISM_AUTH_MODE='password' -PHOTOPRISM_ADMIN_PASSWORD='changeme' +PHOTOPRISM_ADMIN_PASSWORD='helper-scripts.com' PHOTOPRISM_HTTP_HOST='0.0.0.0' PHOTOPRISM_HTTP_PORT='2342' PHOTOPRISM_SITE_CAPTION='https://tteck.github.io/Proxmox/' diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index c4cc0e8d4..f831ccce7 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -78,7 +78,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then else 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 + filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null fi msg_ok "Installed ${APP} on $hostname" From fe9736fd38926d7ceddaa290404734df6727aea5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 08:52:08 -0400 Subject: [PATCH 23/46] Update trilium.sh - fix release path changes - fixes https://github.com/tteck/Proxmox/issues/3930 --- ct/trilium.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/trilium.sh b/ct/trilium.sh index ac162c500..1b7b74caf 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -55,21 +55,21 @@ 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/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') 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/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null +msg_info "Updating to ${RELEASE}" +wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz +tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz cp -r trilium-linux-x64-server/* /opt/trilium/ -msg_ok "Updated to v${RELEASE}" +msg_ok "Updated to ${RELEASE}" msg_info "Cleaning up" -rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server +rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz trilium-linux-x64-server msg_ok "Cleaned" msg_info "Starting ${APP}" From e643fe6699ff4f1ac1a4ec342bb1498061d92145 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 08:55:49 -0400 Subject: [PATCH 24/46] Update trilium-install.sh fix release path --- install/trilium-install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/trilium-install.sh b/install/trilium-install.sh index d2e7ae3f4..9f8938ab5 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -19,11 +19,11 @@ $STD apt-get install -y sudo $STD apt-get install -y mc msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Installing TriliumNext" -wget -q https://github.com/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz -$STD tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz +wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz +tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz mv trilium-linux-x64-server /opt/trilium msg_ok "Installed TriliumNext" @@ -53,5 +53,5 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz +rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz msg_ok "Cleaned" From dbc4ce023165d563595cb62ccbf43dc6bc1f0ec9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 10:25:42 -0400 Subject: [PATCH 25/46] Update cockpit-install.sh use backports --- install/cockpit-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh index a5dfbc207..ee7a4c59d 100644 --- a/install/cockpit-install.sh +++ b/install/cockpit-install.sh @@ -22,7 +22,10 @@ $STD apt-get install -y mc msg_ok "Installed Dependencies" msg_info "Installing Cockpit" -$STD apt install -y cockpit --no-install-recommends +source /etc/os-release +echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" >/etc/apt/sources.list.d/backports.list +$STD apt-get update +$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit -y sed -i "s/root//g" /etc/cockpit/disallowed-users msg_ok "Installed Cockpit" From efd6d74edb2c3a8fb876a28940b4087caa300de8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 10:34:53 -0400 Subject: [PATCH 26/46] Update cockpit-install.sh tweak --- install/cockpit-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh index ee7a4c59d..adc328a48 100644 --- a/install/cockpit-install.sh +++ b/install/cockpit-install.sh @@ -25,7 +25,7 @@ msg_info "Installing Cockpit" source /etc/os-release echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" >/etc/apt/sources.list.d/backports.list $STD apt-get update -$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit -y +$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit --no-install-recommends -y sed -i "s/root//g" /etc/cockpit/disallowed-users msg_ok "Installed Cockpit" From f3408ed4f3be741003cfcb8c48a27060e8245114 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 10:36:23 -0400 Subject: [PATCH 27/46] Update cockpit.sh increase resources --- ct/cockpit.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/cockpit.sh b/ct/cockpit.sh index c38adaea7..479229950 100644 --- a/ct/cockpit.sh +++ b/ct/cockpit.sh @@ -20,9 +20,9 @@ EOF header_info echo -e "Loading..." APP="Cockpit" -var_disk="2" -var_cpu="1" -var_ram="512" +var_disk="4" +var_cpu="2" +var_ram="1024" var_os="debian" var_version="12" variables From ec24441a2a4f1334abc1a79101e016bcd4c866bc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 11:02:23 -0400 Subject: [PATCH 28/46] Update cockpit-install.sh test --- install/cockpit-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh index adc328a48..94ac22f6e 100644 --- a/install/cockpit-install.sh +++ b/install/cockpit-install.sh @@ -25,7 +25,8 @@ msg_info "Installing Cockpit" source /etc/os-release echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" >/etc/apt/sources.list.d/backports.list $STD apt-get update -$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit --no-install-recommends -y +#$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit --no-install-recommends -y +$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit -y sed -i "s/root//g" /etc/cockpit/disallowed-users msg_ok "Installed Cockpit" From 7d26b421638d167d405215fe88146b7a212a695f Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 11:10:43 -0400 Subject: [PATCH 29/46] Update cockpit-install.sh tweak --- install/cockpit-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh index 94ac22f6e..1921511e0 100644 --- a/install/cockpit-install.sh +++ b/install/cockpit-install.sh @@ -25,8 +25,8 @@ msg_info "Installing Cockpit" source /etc/os-release echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" >/etc/apt/sources.list.d/backports.list $STD apt-get update -#$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit --no-install-recommends -y -$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit -y +$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit --no-install-recommends -y +$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit-packagekit -y sed -i "s/root//g" /etc/cockpit/disallowed-users msg_ok "Installed Cockpit" From dd3a32986a7efc7269db640ea24a503754b27e07 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 11:19:13 -0400 Subject: [PATCH 30/46] Update cockpit-install.sh tweak --- install/cockpit-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh index 1921511e0..adc328a48 100644 --- a/install/cockpit-install.sh +++ b/install/cockpit-install.sh @@ -26,7 +26,6 @@ source /etc/os-release echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" >/etc/apt/sources.list.d/backports.list $STD apt-get update $STD apt-get install -t ${VERSION_CODENAME}-backports cockpit --no-install-recommends -y -$STD apt-get install -t ${VERSION_CODENAME}-backports cockpit-packagekit -y sed -i "s/root//g" /etc/cockpit/disallowed-users msg_ok "Installed Cockpit" From e995fb4f30614112a67ff5c805e2996cd4d8a7b4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 13:49:36 -0400 Subject: [PATCH 31/46] Update tianji-install.sh tweak --- install/tianji-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/tianji-install.sh b/install/tianji-install.sh index ebd6cd780..3d476444f 100644 --- a/install/tianji-install.sh +++ b/install/tianji-install.sh @@ -31,7 +31,7 @@ $STD apt-get install -y \ mc msg_ok "Installed Dependencies" -msg_info "Installing Node.js, pnpm & pm2" +msg_info "Installing Node.js" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list @@ -39,7 +39,7 @@ $STD apt-get update $STD apt-get install -y nodejs $STD npm install -g pnpm@9.7.1 export NODE_OPTIONS="--max_old_space_size=4096" -msg_ok "Installed Node.js, pnpm & pm2" +msg_ok "Installed Node.js" msg_info "Setting up PostgreSQL" DB_NAME=tianji_db From e2e4784136c9af3ef4ec3c6fb0655b4863e7d62d Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 13:51:56 -0400 Subject: [PATCH 32/46] Update tianji.sh no update path available --- ct/tianji.sh | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/ct/tianji.sh b/ct/tianji.sh index e8e83766e..d740d975c 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -55,32 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/tianji ]]; 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? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi -RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/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 ${APP} Service" - systemctl stop tianji - msg_ok "Stopped ${APP} Service" - - msg_info "Updating ${APP} to ${RELEASE}" - cd /opt/tianji - git checkout -f -q v${RELEASE} - cd src/server - pnpm db:migrate:apply >/dev/null 2>&1 - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated ${APP} to ${RELEASE}" - - msg_info "Starting ${APP}" - systemctl start tianji - msg_ok "Started ${APP}" - msg_ok "Updated Successfully" -else - msg_ok "No update required. ${APP} is already at ${RELEASE}." -fi +msg_error "There is currently no update path available." exit } From 5b22df5c8ed640ee3c3ae99aeba23139c9107bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Sun, 20 Oct 2024 02:22:35 +0200 Subject: [PATCH 33/46] Add new LXC: Neo4j (#3932) --- ct/neo4j.sh | 72 ++++++++++++++++++++++++++++++++++++++++ install/neo4j-install.sh | 39 ++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 ct/neo4j.sh create mode 100644 install/neo4j-install.sh diff --git a/ct/neo4j.sh b/ct/neo4j.sh new file mode 100644 index 000000000..123625d57 --- /dev/null +++ b/ct/neo4j.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ __ _ + / | / /__ ____ / // / (_) + / |/ / _ \/ __ \/ // /_/ / + / /| / __/ /_/ /__ __/ / +/_/ |_/\___/\____/ /_/_/ / + /___/ +EOF +} +header_info +echo -e "Loading..." +APP="Neo4j" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /etc/neo4j ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} Browser should be reachable by going to the following URL. + ${BL}http://${IP}:7474${CL} \n" diff --git a/install/neo4j-install.sh b/install/neo4j-install.sh new file mode 100644 index 000000000..f5e8b8675 --- /dev/null +++ b/install/neo4j-install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +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 gpg +msg_ok "Installed Dependencies" + +msg_info "Installing Neo4j (patience)" +wget -qO- https://debian.neo4j.com/neotechnology.gpg.key | gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg +echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' > /etc/apt/sources.list.d/neo4j.list +$STD apt-get update +$STD apt-get install -y neo4j +sed -i '/server.default_listen_address/s/^#//' /etc/neo4j/neo4j.conf +systemctl enable -q --now neo4j +msg_ok "Installed Neo4j" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 1fb144306c0ccae37cb8cd6c993b4fb6ed785d10 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 20:23:11 -0400 Subject: [PATCH 34/46] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d8f18733..edbb01ff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2024-10-19 + +### Changed + +- **Cockpit LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/cockpit-install.sh) + - NEW Script + ## 2024-10-18 ### Changed From cac29c8f5ce09233ea7544405ae1735200ad71ae Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 20:50:17 -0400 Subject: [PATCH 35/46] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index edbb01ff2..9472a5efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ All LXC instances created using this repository come pre-installed with Midnight - **Cockpit LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/cockpit-install.sh) - NEW Script +- **Neo4j LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/neo4j-install.sh) + - NEW Script ## 2024-10-18 From dbcb900da458fe5ee5dc8ef2492cd1712e69e032 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 19 Oct 2024 21:03:50 -0400 Subject: [PATCH 36/46] Update tianji.sh Revert "no update path available" --- ct/tianji.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ct/tianji.sh b/ct/tianji.sh index d740d975c..6ff10f9cf 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -55,7 +55,29 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/tianji ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/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 ${APP} Service" + systemctl stop tianji + msg_ok "Stopped ${APP} Service" + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt/tianji + git checkout -f -q v${RELEASE} + cd src/server + pnpm db:migrate:apply >/dev/null 2>&1 + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + msg_info "Starting ${APP}" + systemctl start tianji + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}." +fi exit } From 9a0cb6b8f5a379a0f4ecbcad8c2e77fc36709e2f Mon Sep 17 00:00:00 2001 From: Jacob <630000+stickpin@users.noreply.github.com> Date: Sun, 20 Oct 2024 20:02:09 +0200 Subject: [PATCH 37/46] Changedetection update enhancements (#3933) --- ct/changedetection.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index b6f423694..85067c6b0 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -62,6 +62,16 @@ if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then fi pip3 install changedetection.io --upgrade &>/dev/null pip3 install playwright --upgrade &>/dev/null +if [[ -f /etc/systemd/system/browserless.service ]]; then + git -C /opt/browserless/ pull &>/dev/null + npm update --prefix /opt/browserless &>/dev/null + npm run build --prefix /opt/browserless &>/dev/null + npm run build:function --prefix /opt/browserless &>/dev/null + npm prune production --prefix /opt/browserless &>/dev/null + systemctl restart browserless +else + msg_error "No Browserless Installation Found!" +fi systemctl restart changedetection msg_ok "Updated Successfully" exit From 95dbf935912963d870338ddce7843d92b61caf2f Mon Sep 17 00:00:00 2001 From: ngarafol Date: Sun, 20 Oct 2024 23:03:21 +0200 Subject: [PATCH 38/46] use pm2 with systemd to make pingvin-share survive reboots (#3935) --- ct/pingvin.sh | 4 ++-- install/pingvin-install.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 0cce4f60d..c9a264cbb 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -56,7 +56,7 @@ function update_script() { header_info if [[ ! -d /opt/pingvin-share ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping Pingvin Share" -pm2 stop pingvin-share-backend pingvin-share-frontend &>/dev/null +systemctl stop pm2-root.service msg_ok "Stopped Pingvin Share" msg_info "Updating Pingvin Share" @@ -72,7 +72,7 @@ npm run build &>/dev/null msg_ok "Updated Pingvin Share" msg_info "Starting Pingvin Share" -pm2 start pingvin-share-backend pingvin-share-frontend &>/dev/null +systemctl start pm2-root.service msg_ok "Started Pingvin Share" msg_ok "Updated Successfully" diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index 4430cc214..2997bbbcc 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -47,7 +47,10 @@ sed -i '/"admin.config.smtp.allow-unauthorized-certificates":\|admin.config.smtp $STD npm install $STD npm run build $STD pm2 start --name="pingvin-share-frontend" npm -- run start -$STD pm2 startup +# create and enable pm2-root systemd script +$STD pm2 startup systemd +# save running pm2 processes so pingvin-share can survive reboots +$STD pm2 save msg_ok "Installed Pingvin Share" motd_ssh From 128b076731e86dc55f5f2d9525f1dfe0edcdcbcc Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 19:17:22 -0400 Subject: [PATCH 39/46] Update peanut.sh "SET RESOURCES" whiptail --- ct/peanut.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/peanut.sh b/ct/peanut.sh index fb2975d7a..d776df0de 100644 --- a/ct/peanut.sh +++ b/ct/peanut.sh @@ -56,6 +56,7 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/peanut.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 RELEASE=$(curl -sL https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep '"tag_name":' | cut -d'"' -f4) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating $APP to ${RELEASE}" From f75fbc8d500571542773786ce394b0bf152f8f83 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 22:02:26 -0400 Subject: [PATCH 40/46] Update flaresolverr.sh "SET RESOURCES" whiptail --- ct/flaresolverr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/flaresolverr.sh b/ct/flaresolverr.sh index 85cc927a3..a00702a38 100644 --- a/ct/flaresolverr.sh +++ b/ct/flaresolverr.sh @@ -56,6 +56,7 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/flaresolverr.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 RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Updating $APP LXC" From 087d635fd498ad133ed610e1e4610791e166cf7b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 22:03:56 -0400 Subject: [PATCH 41/46] Update flowiseai.sh "SET RESOURCES" whiptail --- ct/flowiseai.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh index 4dc58f6bf..2e44acceb 100644 --- a/ct/flowiseai.sh +++ b/ct/flowiseai.sh @@ -55,6 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -f /etc/systemd/system/flowise.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 msg_info "Updating ${APP}" systemctl stop flowise npm install -g flowise --upgrade From e9940cc535ab7a05193574bbf8f327ccca24ed88 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 22:06:55 -0400 Subject: [PATCH 42/46] Update mafl.sh "SET RESOURCES" whiptail --- ct/mafl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/mafl.sh b/ct/mafl.sh index 2dfee1714..0859f8343 100644 --- a/ct/mafl.sh +++ b/ct/mafl.sh @@ -55,7 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/mafl ]]; 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 RELEASE=$(curl -s https://api.github.com/repos/hywax/mafl/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Updating Mafl to v${RELEASE} (Patience)" systemctl stop mafl From 50ce6fd6df77a1d78c3dc03654bcacbd81c012b6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 22:09:28 -0400 Subject: [PATCH 43/46] Update nginxproxymanager.sh "SET RESOURCES" whiptail --- ct/nginxproxymanager.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index e609e78f1..030e7011b 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -59,6 +59,7 @@ function update_script() { 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 if ! command -v pnpm &> /dev/null; then msg_info "Installing pnpm" #export NODE_OPTIONS=--openssl-legacy-provider From 09721e7caea1c05b106920479232dcb37ac5cd5b Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 22:13:27 -0400 Subject: [PATCH 44/46] Update umami.sh "SET RESOURCES" whiptail --- ct/umami.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/umami.sh b/ct/umami.sh index 065f4516d..3d56fb567 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -55,6 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/umami ]]; 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 if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit From 30a5147fba5d4e990edd5f56bfaae8119f2764ff Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 22:14:50 -0400 Subject: [PATCH 45/46] Update vaultwarden.sh "SET RESOURCES" whiptail --- ct/vaultwarden.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index f7901b791..612a20ec2 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -57,6 +57,7 @@ function update_script() { 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 VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') From 8206f0b3dccd5f557e543fe5be2545718b8ed2d9 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 20 Oct 2024 22:16:26 -0400 Subject: [PATCH 46/46] Update zoraxy.sh "SET RESOURCES" whiptail --- ct/zoraxy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 84a407852..a9694ac7c 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -55,6 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/zoraxy/src ]]; 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 zoraxy cd /opt/zoraxy/src