diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0eb367c..9472a5efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,22 @@ 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 +- **Neo4j LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/neo4j-install.sh) + - NEW Script + +## 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 diff --git a/ct/archivebox.sh b/ct/archivebox.sh new file mode 100644 index 000000000..9b058660c --- /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" diff --git a/ct/changedetection.sh b/ct/changedetection.sh index d3becf1c8..82c307ed5 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 diff --git a/ct/cockpit.sh b/ct/cockpit.sh new file mode 100644 index 000000000..479229950 --- /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="4" +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() { +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/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 } diff --git a/ct/flaresolverr.sh b/ct/flaresolverr.sh index c658b8622..f816efe01 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 [[ ! -d /opt/flaresolverr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh index 04bd9f18a..11dbb2831 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 diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index ad00c43ac..560767a5b 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 968270178..0c3ccf1aa 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-arm64-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/jellyseerr.sh b/ct/jellyseerr.sh index da19582a0..5b751ed27 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 @@ -55,19 +55,46 @@ 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..." + npm install -g pnpm &>/dev/null +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 + msg_ok "$APP is already up to date." exit fi -CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile --network-timeout 1000000 &>/dev/null -yarn build &>/dev/null +systemctl stop jellyseerr +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 daemon-reload systemctl start jellyseerr msg_ok "Updated $APP" exit @@ -77,6 +104,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" diff --git a/ct/mafl.sh b/ct/mafl.sh index ea9a73a64..74d42f9a2 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 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/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 70a4077d6..e8cedb8c6 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 diff --git a/ct/peanut.sh b/ct/peanut.sh index 19a75f933..249611b65 100644 --- a/ct/peanut.sh +++ b/ct/peanut.sh @@ -55,6 +55,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}" diff --git a/ct/pingvin.sh b/ct/pingvin.sh index ef86cc9a6..56f53c162 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/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 2af98e350..134875ade 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/ct/tianji.sh b/ct/tianji.sh index e8e83766e..6ff10f9cf 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -61,11 +61,9 @@ if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then 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} @@ -73,7 +71,6 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v 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}" diff --git a/ct/trilium.sh b/ct/trilium.sh index e06ec1ef2..44bd157e2 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -5,7 +5,7 @@ # # License: MIT # # https://github.com/tteck/Proxmox/raw/main/LICENSE -echo "Unsupported. View notes on GitHub." +echo "Unsupported." # function header_info { # clear @@ -57,23 +57,21 @@ echo "Unsupported. View notes on GitHub." # 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 | -# 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/zadam/trilium/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}" diff --git a/ct/umami.sh b/ct/umami.sh index dbf5ebc1d..2fba79353 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 diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index e04a4cf98..748274bb6 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) }') diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 4f75764b3..87defa0c6 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 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" diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 025f6e442..0e0e8e914 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -78,7 +78,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" @@ -127,7 +129,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 @@ -138,14 +140,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 diff --git a/install/cockpit-install.sh b/install/cockpit-install.sh new file mode 100644 index 000000000..adc328a48 --- /dev/null +++ b/install/cockpit-install.sh @@ -0,0 +1,38 @@ +#!/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" +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 +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" diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index fa268922a..91cd0e482 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -19,7 +19,7 @@ $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 $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" @@ -34,17 +34,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 @@ -64,7 +65,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 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" diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 0d0da6f04..38d1559e7 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -45,7 +45,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/install/pingvin-install.sh b/install/pingvin-install.sh index 2d9c5b60a..b6cfa583b 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -49,7 +49,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 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 diff --git a/install/trilium-install.sh b/install/trilium-install.sh index 7910429d5..dd2ae597d 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -20,11 +20,11 @@ $STD apt-get install -y mc $STD apt-get install -y openssh-server 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" @@ -54,5 +54,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" diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index 5cd242ac8..e6f56a171 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"