From 54085936b01986e472772c7ba6e2e2cc401778bd Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 28 Oct 2025 16:10:56 -0400 Subject: [PATCH 1/7] BentoPDF --- ct/bentopdf.sh | 64 ++++++++++++++++++++++++++++++ frontend/public/json/bentopdf.json | 35 ++++++++++++++++ install/bentopdf-install.sh | 63 +++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 ct/bentopdf.sh create mode 100644 frontend/public/json/bentopdf.json create mode 100644 install/bentopdf-install.sh diff --git a/ct/bentopdf.sh b/ct/bentopdf.sh new file mode 100644 index 000000000..f178ebf69 --- /dev/null +++ b/ct/bentopdf.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/alam00000/bentopdf + +APP="BentoPDF" +var_tags="${var_tags:-pdf-editor}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/bentopdf ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + NODE_VERSION="24" setup_nodejs + + if check_for_gh_release "bentopdf" "alam00000/bentopdf"; then + msg_info "Stopping Service" + systemctl stop bentopdf + msg_ok "Stopped Service" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "/opt/bentopdf" + + msg_info "Updating BentoPDF" + cd /opt/bentopdf + $STD npm ci --no-audit --no-fund + $STD npm run build -- --mode production + cp -r /opt/bentopdf/dist/* /usr/share/nginx/html/ + cp /opt/bentopdf/nginx.conf /etc/nginx/nginx.conf + chown -R nginx:nginx {/usr/share/nginx/html,/etc/nginx/tmp,/etc/nginx/nginx.conf,/var/log/nginx} + msg_ok "Updated BentoPDF" + + msg_info "Starting Service" + systemctl start bentopdf + msg_ok "Started Service" + msg_ok "Updated Successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" diff --git a/frontend/public/json/bentopdf.json b/frontend/public/json/bentopdf.json new file mode 100644 index 000000000..c6ac09c5e --- /dev/null +++ b/frontend/public/json/bentopdf.json @@ -0,0 +1,35 @@ +{ + "name": "BentoPDF", + "slug": "bentopdf", + "categories": [ + 12 + ], + "date_created": "2025-10-30", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://github.com/alam00000/bentopdf", + "website": "https://www.bentopdf.com", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/bentopdf.webp", + "config_path": "/opt/patchmon/backend/.env, /opt/patchmon/frontend/.env", + "description": "A privacy-first, 100% client-side PDF Toolkit. No signups/accounts, works in the browser, online or offline.", + "install_methods": [ + { + "type": "default", + "script": "ct/bentopdf.sh", + "resources": { + "cpu": 1, + "ram": 2048, + "hdd": 4, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/bentopdf-install.sh b/install/bentopdf-install.sh new file mode 100644 index 000000000..d1ad3c38f --- /dev/null +++ b/install/bentopdf-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/alam00000/bentopdf + +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 \ + nginx +msg_ok "Installed Dependencies" + +NODE_VERSION="24" setup_nodejs +fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "/opt/bentopdf" + +msg_info "Setup BentoPDF" +cd /opt/bentopdf +$STD npm ci --no-audit --no-fund +$STD npm run build -- --mode production +cp -r /opt/bentopdf/dist/* /usr/share/nginx/html/ +cp /opt/bentopdf/nginx.conf /etc/nginx/nginx.conf +mkdir -p /etc/nginx/tmp +useradd -M -s /usr/sbin/nologin -r -d /usr/share/nginx/html nginx +chown -R nginx:nginx {/usr/share/nginx/html,/etc/nginx/tmp,/etc/nginx/nginx.conf,/var/log/nginx} +msg_ok "Setup BentoPDF" + +msg_info "Creating Service" +cat </etc/systemd/system/bentopdf.service +[Unit] +Description=BentoPDF Service +After=network.target + +[Service] +Type=simple +User=nginx +Group=nginx +ExecStart=/sbin/nginx -g "daemon off;" +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF + +systemctl -q enable --now bentopdf +msg_ok "Created & started service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +$STD apt-get -y clean +msg_ok "Cleaned" From df2619c12ad42e54686b5123e654bf66bf71d4da Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 28 Oct 2025 16:13:17 -0400 Subject: [PATCH 2/7] Remove config path from BentoPDF JSON --- frontend/public/json/bentopdf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/bentopdf.json b/frontend/public/json/bentopdf.json index c6ac09c5e..2a09b34cf 100644 --- a/frontend/public/json/bentopdf.json +++ b/frontend/public/json/bentopdf.json @@ -12,7 +12,7 @@ "documentation": "https://github.com/alam00000/bentopdf", "website": "https://www.bentopdf.com", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/bentopdf.webp", - "config_path": "/opt/patchmon/backend/.env, /opt/patchmon/frontend/.env", + "config_path": "", "description": "A privacy-first, 100% client-side PDF Toolkit. No signups/accounts, works in the browser, online or offline.", "install_methods": [ { From b2cf9467217cefdf131988af738e7e2ccf189437 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Tue, 28 Oct 2025 16:32:37 -0400 Subject: [PATCH 3/7] BentoPDF: Use simple mode (we don't need all that branding!) --- ct/bentopdf.sh | 4 +--- install/bentopdf-install.sh | 16 +++------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/ct/bentopdf.sh b/ct/bentopdf.sh index f178ebf69..0a9650efb 100644 --- a/ct/bentopdf.sh +++ b/ct/bentopdf.sh @@ -40,10 +40,8 @@ function update_script() { msg_info "Updating BentoPDF" cd /opt/bentopdf $STD npm ci --no-audit --no-fund + export SIMPLE_MODE=true $STD npm run build -- --mode production - cp -r /opt/bentopdf/dist/* /usr/share/nginx/html/ - cp /opt/bentopdf/nginx.conf /etc/nginx/nginx.conf - chown -R nginx:nginx {/usr/share/nginx/html,/etc/nginx/tmp,/etc/nginx/nginx.conf,/var/log/nginx} msg_ok "Updated BentoPDF" msg_info "Starting Service" diff --git a/install/bentopdf-install.sh b/install/bentopdf-install.sh index d1ad3c38f..f426200b2 100644 --- a/install/bentopdf-install.sh +++ b/install/bentopdf-install.sh @@ -13,23 +13,14 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - nginx -msg_ok "Installed Dependencies" - NODE_VERSION="24" setup_nodejs fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "/opt/bentopdf" msg_info "Setup BentoPDF" cd /opt/bentopdf $STD npm ci --no-audit --no-fund +export SIMPLE_MODE=true $STD npm run build -- --mode production -cp -r /opt/bentopdf/dist/* /usr/share/nginx/html/ -cp /opt/bentopdf/nginx.conf /etc/nginx/nginx.conf -mkdir -p /etc/nginx/tmp -useradd -M -s /usr/sbin/nologin -r -d /usr/share/nginx/html nginx -chown -R nginx:nginx {/usr/share/nginx/html,/etc/nginx/tmp,/etc/nginx/nginx.conf,/var/log/nginx} msg_ok "Setup BentoPDF" msg_info "Creating Service" @@ -40,9 +31,8 @@ After=network.target [Service] Type=simple -User=nginx -Group=nginx -ExecStart=/sbin/nginx -g "daemon off;" +WorkingDirectory=/opt/bentopdf +ExecStart=/usr/bin/npx serve dist -p 8080 Restart=always RestartSec=10 From 8e9b7f4df3fed3b3127a8213b30835acc644aba8 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 28 Oct 2025 20:32:54 +0000 Subject: [PATCH 4/7] Update .app files --- ct/headers/bentopdf | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/bentopdf diff --git a/ct/headers/bentopdf b/ct/headers/bentopdf new file mode 100644 index 000000000..692eff64b --- /dev/null +++ b/ct/headers/bentopdf @@ -0,0 +1,6 @@ + ____ __ ____ ____ ______ + / __ )___ ____ / /_____ / __ \/ __ \/ ____/ + / __ / _ \/ __ \/ __/ __ \/ /_/ / / / / /_ + / /_/ / __/ / / / /_/ /_/ / ____/ /_/ / __/ +/_____/\___/_/ /_/\__/\____/_/ /_____/_/ + From b981a868cda791b86b73c86a29ac629480b569b5 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 29 Oct 2025 08:21:22 +0100 Subject: [PATCH 5/7] Add tracktor.sh script for container setup and updates --- ct/tracktor.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ct/tracktor.sh diff --git a/ct/tracktor.sh b/ct/tracktor.sh new file mode 100644 index 000000000..44fc386c4 --- /dev/null +++ b/ct/tracktor.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://tracktor.bytedge.in/ + +APP="tracktor" +var_tags="${var_tags:-car;monitoring}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-6}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/tracktor ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "tracktor" "javedh-dev/tracktor"; then + msg_info "Stopping Service" + systemctl stop tracktor + msg_ok "Stopped Service" + + # msg_info "Correcting Services" + # if [ -f /opt/tracktor/app/backend/.env ]; then + #mv /opt/tracktor/app/backend/.env /opt/tracktor.env + # echo 'AUTH_PIN=123456' >> /opt/tracktor.env + # sed -i 's|^EnvironmentFile=.*|EnvironmentFile=/opt/tracktor.env|' /etc/systemd/system/tracktor.service + # systemctl daemon-reload + # fi + # msg_ok "Corrected Services" + + setup_nodejs + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor" + + msg_info "Updating tracktor" + cd /opt/tracktor + $STD npm install + $STD npm run build + msg_ok "Updated tracktor" + + msg_info "Starting Service" + systemctl start tracktor + msg_ok "Started Service" + msg_ok "Updated Successfully" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" From ba536ccc6a22d6b8e7f3307d7101973f9e5d0ecc Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 29 Oct 2025 08:30:15 +0100 Subject: [PATCH 6/7] Add installation script for Tracktor This script installs and configures Tracktor, setting up necessary directories, environment variables, and a systemd service. --- install/tracktor-install.sh | 70 +++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 install/tracktor-install.sh diff --git a/install/tracktor-install.sh b/install/tracktor-install.sh new file mode 100644 index 000000000..1111a698d --- /dev/null +++ b/install/tracktor-install.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Copyright (c) 2025 Community Scripts ORG +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://tracktor.bytedge.in + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +setup_nodejs +fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor" + +msg_info "Configuring Tracktor" +cd /opt/tracktor +$STD npm install +$STD npm run build +mkdir -p /opt/tracktor-data/uploads +mkdir -p /opt/tracktor-data/logs +HOST_IP=$(hostname -I | awk '{print $1}') +cat </opt/tracktor.env +NODE_ENV=production +DB_PATH=/opt/tracktor-data/tracktor.db +UPLOADS_DIR="/opt/tracktor-data/uploads" +LOG_DIR="/opt/tracktor-data/logs" +# If server host is not set by default it will run on all interfaces - `0.0.0.0` +SERVER_HOST="" +SERVER_PORT=3000 +PORT=3000 +# CORS_ORIGINS="*" // Set this if you want to secure your endpoints otherwise default will be "*" +# PUBLIC_API_BASE_URL="" // Set this if you are using backend and frontend separately. For lxc installation this is not needed +LOG_REQUESTS=true +LOG_LEVEL="info" +AUTH_PIN=123456 +# PUBLIC_DEMO_MODE=false +# FORCE_DATA_SEED=false +EOF +msg_ok "Configured Tracktor" + +msg_info "Creating service" +cat </etc/systemd/system/tracktor.service +[Unit] +Description=Tracktor Service +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/tracktor +EnvironmentFile=/opt/tracktor.env +ExecStart=/usr/bin/npm start + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now tracktor +msg_ok "Created service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt -y autoremove +$STD apt -y autoclean +$STD apt -y clean +msg_ok "Cleaned" From 3b8373739275e91d1a4c5f106c8ecf6926531f1f Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 29 Oct 2025 08:46:09 +0100 Subject: [PATCH 7/7] Refactor comments in tracktor-install.sh Updated comments for clarity and removed default server host setting. --- install/tracktor-install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install/tracktor-install.sh b/install/tracktor-install.sh index 1111a698d..a979dfdbc 100644 --- a/install/tracktor-install.sh +++ b/install/tracktor-install.sh @@ -28,12 +28,14 @@ NODE_ENV=production DB_PATH=/opt/tracktor-data/tracktor.db UPLOADS_DIR="/opt/tracktor-data/uploads" LOG_DIR="/opt/tracktor-data/logs" -# If server host is not set by default it will run on all interfaces - `0.0.0.0` -SERVER_HOST="" +# If server host is not set by default it will run on all interfaces - 0.0.0.0 +# SERVER_HOST="" SERVER_PORT=3000 PORT=3000 -# CORS_ORIGINS="*" // Set this if you want to secure your endpoints otherwise default will be "*" -# PUBLIC_API_BASE_URL="" // Set this if you are using backend and frontend separately. For lxc installation this is not needed +# Set this if you want to secure your endpoints otherwise default will be "*" +# CORS_ORIGINS="*" +# Set this if you are using backend and frontend separately. For lxc installation this is not needed +# PUBLIC_API_BASE_URL="" LOG_REQUESTS=true LOG_LEVEL="info" AUTH_PIN=123456