From aaeb8600832374c44982982424379c115d0ca63f Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 02:19:49 +0300 Subject: [PATCH 01/34] added the main ct script --- ct/rustypaste.sh | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 ct/rustypaste.sh diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh new file mode 100644 index 000000000..d12dc499d --- /dev/null +++ b/ct/rustypaste.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: GoldenSpringness +# License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/orhun/rustypaste + +# App Default Values +APP="rustypaste" +var_tags="${var_tags:-pastebin;storage}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-20}" +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 + + # Check if installation is present | -f for file, -d for folder + if [[ ! -f "/opt/${APP}/target/release/rustypaste" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + # Crawling the new version and checking whether an update is required + RELEASE=$(curl -s https://api.github.com/repos/orhun/rustypaste/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + # Stopping Services + msg_info "Stopping $APP" + systemctl stop ${APP} + msg_ok "Stopped $APP" + + # Creating Backup + msg_info "Creating Backup" + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" "/opt/${APP}/upload" + msg_ok "Backup Created" + + # Execute Update + msg_info "Updating $APP to ${RELEASE}" + cd /opt/rustypaste + + git fetch --tags + git switch --detach ${RELEASE} + + cargo build --locked --release + msg_ok "Updated $APP to ${RELEASE}" + + # Starting Services + msg_info "Starting $APP" + systemctl start ${APP} + msg_ok "Started $APP" + + # Last Action + echo "${RELEASE}" > /opt/${APP}_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + 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}:8000${CL}" From 2a81c8856899fe98277a8c09c06d48fd97e5f953 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 02:20:10 +0300 Subject: [PATCH 02/34] added the installation script --- install/rustypaste-install.sh | 84 +++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 install/rustypaste-install.sh diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh new file mode 100644 index 000000000..dd37538e7 --- /dev/null +++ b/install/rustypaste-install.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: GoldenSpringness +# License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/orhun/rustypaste + +# Import Functions und Setup +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 \ + git \ + build-essential \ + ca-certificates +msg_ok "Dependencies Installed Successfully" + +setup_rust + +msg_info "Setting up ${APPLICATION}" +# Getting the latest release version +RELEASE=$(curl -s https://api.github.com/repos/orhun/rustypaste/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /opt +git clone https://github.com/orhun/rustypaste.git + +if [[ ! -d "/opt/${APPLICATION}" ]]; then + msg_error "Git clone has failed" + exit +fi + +cd ${APPLICATION} +git fetch --tags +git switch --detach ${RELEASE} # checking out to latest release + +sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml # changing the ip and port + +msg_info "Compiling ${APPLICATION}" +cargo build --locked --release # creating the binary + +if [[ ! -f "/opt/${APPLICATION}/target/release/rustypaste" ]]; then + msg_error "Cargo build failed" + exit +fi + +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt # creating version file for the update function +msg_ok "Setting up ${APPLICATION} is Done!" + +# Creating Service (if needed) +msg_info "Creating Service" +cat </etc/systemd/system/${APPLICATION}.service +[Unit] +Description=${APPLICATION} Service +After=network.target + +[Service] +WorkingDirectory=/opt/rustypaste +ExecStart=/opt/${APPLICATION}/target/release/rustypaste +Restart=always + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now ${APPLICATION}.service +msg_ok "Created Service" + +msg_ok "RustyPaste is Running!" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From f6aeb3117c71dd49527c7472831dd5d91038ad10 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 02:20:22 +0300 Subject: [PATCH 03/34] added the configuration json --- frontend/public/json/rustypaste.json | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 frontend/public/json/rustypaste.json diff --git a/frontend/public/json/rustypaste.json b/frontend/public/json/rustypaste.json new file mode 100644 index 000000000..8f3aed405 --- /dev/null +++ b/frontend/public/json/rustypaste.json @@ -0,0 +1,35 @@ +{ + "name": "RustyPaste", + "slug": "rustypaste", + "categories": [ + 12 + ], + "date_created": "2025-12-22", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8000, + "documentation": "https://github.com/orhun/rustypaste", + "config_path": "", + "website": "https://github.com/orhun/rustypaste", + "logo": "https://github.com/orhun/rustypaste/raw/master/img/rustypaste_logo.png", + "description": "/opt/rustypaste/config.toml", + "install_methods": [ + { + "type": "default", + "script": "ct/rustypaste.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 20, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From 6c39ea9e35e3622bc149d7c21ed5307f1acbf16c Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 02:26:15 +0300 Subject: [PATCH 04/34] Changing misc --- misc/build.func | 10 +++++----- misc/install.func | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index 7ce994d1e..f7ae8fd0f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/api.func) +source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" diff --git a/misc/install.func b/misc/install.func index f474b4062..82155a6c1 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,8 +173,8 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors } From cdc6806bf3f425b1db894933a5522c4e11e9ecb4 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 02:38:54 +0300 Subject: [PATCH 05/34] Changed some more misc --- install/rustypaste-install.sh | 2 +- misc/build.func | 4 ++-- misc/install.func | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index dd37538e7..d2e84745c 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -23,7 +23,7 @@ $STD apt-get install -y \ ca-certificates msg_ok "Dependencies Installed Successfully" -setup_rust +RUST_VERSION="1.92.0" setup_rust msg_info "Setting up ${APPLICATION}" # Getting the latest release version diff --git a/misc/build.func b/misc/build.func index f7ae8fd0f..2ea6bcaa6 100644 --- a/misc/build.func +++ b/misc/build.func @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3286,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) diff --git a/misc/install.func b/misc/install.func index 82155a6c1..3932ae72c 100644 --- a/misc/install.func +++ b/misc/install.func @@ -174,7 +174,7 @@ _bootstrap() { # Source core functions source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypastemisc/error_handler.func) load_functions catch_errors } From de220d80d7fa6d3ee5bda230ed6952136224f756 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 02:52:26 +0300 Subject: [PATCH 06/34] added some comments + added note to json --- ct/rustypaste.sh | 6 +++--- frontend/public/json/rustypaste.json | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index d12dc499d..ad82534db 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -41,17 +41,17 @@ function update_script() { # Creating Backup msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" "/opt/${APP}/upload" + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" "/opt/${APP}/upload" # Backing up full project + all bins msg_ok "Backup Created" # Execute Update msg_info "Updating $APP to ${RELEASE}" cd /opt/rustypaste - git fetch --tags + git fetch --tags # getting newest versions git switch --detach ${RELEASE} - cargo build --locked --release + cargo build --locked --release # recreating the binary msg_ok "Updated $APP to ${RELEASE}" # Starting Services diff --git a/frontend/public/json/rustypaste.json b/frontend/public/json/rustypaste.json index 8f3aed405..c8cbc59e0 100644 --- a/frontend/public/json/rustypaste.json +++ b/frontend/public/json/rustypaste.json @@ -31,5 +31,7 @@ "username": null, "password": null }, - "notes": [] + "notes": [ + "When updating the script it will backup the whole project, make sure to extract it to a safe location or remove", + ] } From c3343846b67e7e8eaccbaf3cb4253516c3ec578a Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 02:56:36 +0300 Subject: [PATCH 07/34] changed the update script location --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 3932ae72c..747c49717 100644 --- a/misc/install.func +++ b/misc/install.func @@ -911,7 +911,7 @@ EOF # Create update script # Use var_os for OS-based containers, otherwise use app name local update_script_name="${var_os:-$app}" - echo "bash -c \"\$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/ct/${update_script_name}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/ct/${update_script_name}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update # Inject SSH authorized keys if provided From 736fd3262e5610d2ee1bcb2460c393955236969b Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 03:20:56 +0300 Subject: [PATCH 08/34] removed build and install changes --- ct/rustypaste.sh | 2 +- misc/build.func | 14 +++++++------- misc/install.func | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index ad82534db..519799b28 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) +source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE diff --git a/misc/build.func b/misc/build.func index 2ea6bcaa6..da34a7f82 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/api.func) +source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(wget -qO- https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(wget -qO- https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3286,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func) + source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) diff --git a/misc/install.func b/misc/install.func index 747c49717..323d3b934 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,8 +173,8 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypastemisc/error_handler.func) + source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/core.func) + source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors } @@ -911,7 +911,7 @@ EOF # Create update script # Use var_os for OS-based containers, otherwise use app name local update_script_name="${var_os:-$app}" - echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/ct/${update_script_name}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/ct/${update_script_name}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update # Inject SSH authorized keys if provided From 42c76d5288f2b3d9f727253cb04fb520677e8e9e Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 03:23:55 +0300 Subject: [PATCH 09/34] minor fixes --- misc/build.func | 14 ++++++-------- misc/install.func | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index da34a7f82..a82f557f1 100644 --- a/misc/build.func +++ b/misc/build.func @@ -187,14 +187,14 @@ variables() { source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(wget -qO- https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -3199,9 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/${var_install}.sh)" - local lxc_exit=$? - + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" set -Eeuo pipefail # Re-enable error handling trap 'error_handler' ERR # Restore ERR trap @@ -3286,7 +3284,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) diff --git a/misc/install.func b/misc/install.func index 323d3b934..64dea5fe2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,8 +173,8 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/core.func) - source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/core.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors } From 51cd952fd0e3859e3217b5698aaf87f60bfa30d1 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 03:25:09 +0300 Subject: [PATCH 10/34] minor fix --- misc/build.func | 2 ++ misc/install.func | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index a82f557f1..7ce994d1e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -3200,6 +3200,8 @@ EOF' trap - ERR # Remove ERR trap completely lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + local lxc_exit=$? + set -Eeuo pipefail # Re-enable error handling trap 'error_handler' ERR # Restore ERR trap diff --git a/misc/install.func b/misc/install.func index 64dea5fe2..f474b4062 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,7 +173,7 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/core.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors From 87237346b360637453cd6539af638c492dc83af5 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Mon, 22 Dec 2025 19:53:59 +0300 Subject: [PATCH 11/34] setting up for reject fixes --- misc/build.func | 4 ++-- misc/install.func | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/build.func b/misc/build.func index 7ce994d1e..f9ecb9c58 100644 --- a/misc/build.func +++ b/misc/build.func @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3286,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) diff --git a/misc/install.func b/misc/install.func index f474b4062..0a239111d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,8 +173,8 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors } From 0befe26bedce09bf5428965def521785ea9ad564 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:04:15 +0300 Subject: [PATCH 12/34] changed rejects from pr review --- ct/rustypaste.sh | 47 ++++++++++++++--------------------- install/rustypaste-install.sh | 37 +++++++++------------------ misc/build.func | 14 +++++------ 3 files changed, 38 insertions(+), 60 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 519799b28..1cca586d1 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash -source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) +source <(curl -s raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/orhun/rustypaste -# App Default Values APP="rustypaste" var_tags="${var_tags:-pastebin;storage}" var_cpu="${var_cpu:-1}" @@ -25,45 +24,37 @@ function update_script() { check_container_storage check_container_resources - # Check if installation is present | -f for file, -d for folder - if [[ ! -f "/opt/${APP}/target/release/rustypaste" ]]; then - msg_error "No ${APP} Installation Found!" + if [[ ! -f "/opt/rustypaste/target/release/rustypaste" ]]; then + msg_error "No rustypaste Installation Found!" exit fi - # Crawling the new version and checking whether an update is required - RELEASE=$(curl -s https://api.github.com/repos/orhun/rustypaste/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - # Stopping Services - msg_info "Stopping $APP" - systemctl stop ${APP} - msg_ok "Stopped $APP" + if check_for_gh_release "rustypaste" "orhun/rustypaste"; then + + msg_info "Stopping rustypaste" + systemctl stop rustypaste + msg_ok "Stopped rustypaste" - # Creating Backup msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" "/opt/${APP}/upload" # Backing up full project + all bins + tar -czf "/opt/rustypaste_backup_$(date +%F).tar.gz" "/opt/rustypaste/upload" msg_ok "Backup Created" - # Execute Update - msg_info "Updating $APP to ${RELEASE}" + msg_info "Updating rustypaste to latest" cd /opt/rustypaste - git fetch --tags # getting newest versions - git switch --detach ${RELEASE} + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" - cargo build --locked --release # recreating the binary - msg_ok "Updated $APP to ${RELEASE}" + cargo build --locked --release - # Starting Services - msg_info "Starting $APP" - systemctl start ${APP} - msg_ok "Started $APP" + msg_ok "Updated rustypaste to latest" + + msg_info "Starting rustypaste" + systemctl start rustypaste + msg_ok "Started rustypaste" - # Last Action - echo "${RELEASE}" > /opt/${APP}_version.txt msg_ok "Update Successful" else - msg_ok "No update required. ${APP} is already at ${RELEASE}" + msg_ok "No update required. rustypaste is already at latest" fi exit } @@ -73,6 +64,6 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${CREATING}${GN}rustypaste setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index d2e84745c..d028cbaf2 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -5,7 +5,6 @@ # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/orhun/rustypaste -# Import Functions und Setup source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 @@ -25,51 +24,40 @@ msg_ok "Dependencies Installed Successfully" RUST_VERSION="1.92.0" setup_rust -msg_info "Setting up ${APPLICATION}" -# Getting the latest release version -RELEASE=$(curl -s https://api.github.com/repos/orhun/rustypaste/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -cd /opt -git clone https://github.com/orhun/rustypaste.git +msg_info "Setting up rustypaste" -if [[ ! -d "/opt/${APPLICATION}" ]]; then - msg_error "Git clone has failed" - exit -fi +fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" -cd ${APPLICATION} -git fetch --tags -git switch --detach ${RELEASE} # checking out to latest release +cd /opt/rustypaste -sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml # changing the ip and port +sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml -msg_info "Compiling ${APPLICATION}" -cargo build --locked --release # creating the binary +msg_info "Compiling rustypaste" +cargo build --locked --release -if [[ ! -f "/opt/${APPLICATION}/target/release/rustypaste" ]]; then +if [[ ! -f "/opt/rustypaste/target/release/rustypaste" ]]; then msg_error "Cargo build failed" exit fi -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt # creating version file for the update function -msg_ok "Setting up ${APPLICATION} is Done!" +msg_ok "Setting up rustypaste is Done!" -# Creating Service (if needed) msg_info "Creating Service" -cat </etc/systemd/system/${APPLICATION}.service +cat </etc/systemd/system/rustypaste.service [Unit] -Description=${APPLICATION} Service +Description=rustypaste Service After=network.target [Service] WorkingDirectory=/opt/rustypaste -ExecStart=/opt/${APPLICATION}/target/release/rustypaste +ExecStart=/opt/rustypaste/target/release/rustypaste Restart=always [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now ${APPLICATION}.service +systemctl enable -q --now rustypaste.service msg_ok "Created Service" msg_ok "RustyPaste is Running!" @@ -77,7 +65,6 @@ msg_ok "RustyPaste is Running!" motd_ssh customize -# Cleanup msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean diff --git a/misc/build.func b/misc/build.func index f9ecb9c58..f27aaa963 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/api.func) +source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -2577,7 +2577,7 @@ configure_ssh_settings() { # - Otherwise: shows update/setting menu # ------------------------------------------------------------------------------ start() { - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/tools.func) if command -v pveversion >/dev/null 2>&1; then install_script || return 0 return 0 @@ -2706,7 +2706,7 @@ build_container() { pushd "$TEMP_DIR" >/dev/null # Unified install.func automatically detects OS type (debian, alpine, fedora, etc.) - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func)" # Core exports for install.func export DIAGNOSTICS="$DIAGNOSTICS" From 584c09fb6726c3530953e5329a4528e8641ab5f8 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:08:43 +0300 Subject: [PATCH 13/34] changed rejects from pr review --- ct/rustypaste.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 1cca586d1..9346c3c91 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/main/misc/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE @@ -40,10 +40,12 @@ function update_script() { msg_ok "Backup Created" msg_info "Updating rustypaste to latest" + cd /opt/rustypaste CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" + cargo build --locked --release msg_ok "Updated rustypaste to latest" From fd6e2e1c6c1fb9f31ca9eede5b612a843504eadf Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:10:38 +0300 Subject: [PATCH 14/34] test --- misc/build.func | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/misc/build.func b/misc/build.func index f27aaa963..c16981901 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/api.func) +source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -2577,7 +2577,7 @@ configure_ssh_settings() { # - Otherwise: shows update/setting menu # ------------------------------------------------------------------------------ start() { - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/tools.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func) if command -v pveversion >/dev/null 2>&1; then install_script || return 0 return 0 @@ -2706,7 +2706,7 @@ build_container() { pushd "$TEMP_DIR" >/dev/null # Unified install.func automatically detects OS type (debian, alpine, fedora, etc.) - export FUNCTIONS_FILE_PATH="$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func)" # Core exports for install.func export DIAGNOSTICS="$DIAGNOSTICS" @@ -3199,8 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" - local lxc_exit=$? + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" set -Eeuo pipefail # Re-enable error handling trap 'error_handler' ERR # Restore ERR trap @@ -3286,7 +3285,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func) + source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From 546f30a0138ab83c1b2170bc0feffe058af08815 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:11:12 +0300 Subject: [PATCH 15/34] test --- ct/rustypaste.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 9346c3c91..38baf934e 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/main/misc/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE From c5770781ca24a22d58b8566c1aa1486c070e804d Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:16:46 +0300 Subject: [PATCH 16/34] test2 --- ct/rustypaste.sh | 2 +- misc/build.func | 16 ++++++++-------- misc/install.func | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 38baf934e..4ec9ad873 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/main/misc/build.func) +source <(curl -s raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE diff --git a/misc/build.func b/misc/build.func index c16981901..d6589d780 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/api.func) +source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) - source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) + source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) + source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -2577,7 +2577,7 @@ configure_ssh_settings() { # - Otherwise: shows update/setting menu # ------------------------------------------------------------------------------ start() { - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/tools.func) if command -v pveversion >/dev/null 2>&1; then install_script || return 0 return 0 @@ -2706,7 +2706,7 @@ build_container() { pushd "$TEMP_DIR" >/dev/null # Unified install.func automatically detects OS type (debian, alpine, fedora, etc.) - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install.func)" # Core exports for install.func export DIAGNOSTICS="$DIAGNOSTICS" @@ -4193,7 +4193,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/install.func b/misc/install.func index 0a239111d..10fbe43a2 100644 --- a/misc/install.func +++ b/misc/install.func @@ -742,10 +742,10 @@ EOF # Source appropriate tools.func based on OS case "$OS_FAMILY" in alpine) - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/alpine-tools.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/alpine-tools.func) ;; *) - source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/tools.func) ;; esac } From 6d39f50ec671c4658c962cf30113dacb6517179d Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:21:48 +0300 Subject: [PATCH 17/34] test3 --- misc/build.func | 18 +++++++++--------- misc/install.func | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/misc/build.func b/misc/build.func index d6589d780..d897b3066 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/api.func) +source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) - source <(wget -qO- https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) + source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) + source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -2577,7 +2577,7 @@ configure_ssh_settings() { # - Otherwise: shows update/setting menu # ------------------------------------------------------------------------------ start() { - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/tools.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/tools.func) if command -v pveversion >/dev/null 2>&1; then install_script || return 0 return 0 @@ -2706,7 +2706,7 @@ build_container() { pushd "$TEMP_DIR" >/dev/null # Unified install.func automatically detects OS type (debian, alpine, fedora, etc.) - export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install.func)" # Core exports for install.func export DIAGNOSTICS="$DIAGNOSTICS" @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" set -Eeuo pipefail # Re-enable error handling trap 'error_handler' ERR # Restore ERR trap @@ -4193,7 +4193,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/install.func b/misc/install.func index 10fbe43a2..d4542fa3e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,8 +173,8 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/error_handler.func) load_functions catch_errors } @@ -742,10 +742,10 @@ EOF # Source appropriate tools.func based on OS case "$OS_FAMILY" in alpine) - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/alpine-tools.func) + source <(curl -fsSL https://https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/alpine-tools.func) ;; *) - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/tools.func) + source <(curl -fsSL https://https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/tools.func) ;; esac } From 1edea6ab7aaeade1bee5da0add20f79a3c127b9c Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:25:05 +0300 Subject: [PATCH 18/34] test4 --- misc/build.func | 21 +++++++++++---------- misc/install.func | 10 +++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/misc/build.func b/misc/build.func index d897b3066..b62cce8e7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/api.func) +source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/core.func) - source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/error_handler.func) + source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -2577,7 +2577,7 @@ configure_ssh_settings() { # - Otherwise: shows update/setting menu # ------------------------------------------------------------------------------ start() { - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/tools.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/tools.func) if command -v pveversion >/dev/null 2>&1; then install_script || return 0 return 0 @@ -2706,7 +2706,7 @@ build_container() { pushd "$TEMP_DIR" >/dev/null # Unified install.func automatically detects OS type (debian, alpine, fedora, etc.) - export FUNCTIONS_FILE_PATH="$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func)" # Core exports for install.func export DIAGNOSTICS="$DIAGNOSTICS" @@ -3199,7 +3199,8 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling trap 'error_handler' ERR # Restore ERR trap @@ -3285,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main//misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) @@ -4193,7 +4194,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/install.func b/misc/install.func index d4542fa3e..52e320174 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,8 +173,8 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/error_handler.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) load_functions catch_errors } @@ -742,10 +742,10 @@ EOF # Source appropriate tools.func based on OS case "$OS_FAMILY" in alpine) - source <(curl -fsSL https://https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/alpine-tools.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/alpine-tools.func) ;; *) - source <(curl -fsSL https://https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/tools.func) + source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/tools.func) ;; esac } @@ -911,7 +911,7 @@ EOF # Create update script # Use var_os for OS-based containers, otherwise use app name local update_script_name="${var_os:-$app}" - echo "bash -c \"\$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/ct/${update_script_name}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/ct/${update_script_name}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update # Inject SSH authorized keys if provided From 432d3f4ef4052525ed35f40e43c5382fd53bc8f9 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 00:33:05 +0300 Subject: [PATCH 19/34] test5 --- ct/rustypaste.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 4ec9ad873..3511abbb9 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) +source <(curl -s https://github.com/GoldenSpringness/ProxmoxVED/raw/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE From 41277477c641a02bec5f005d8730ed49430c9fe2 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 01:33:05 +0300 Subject: [PATCH 20/34] test6 --- ct/rustypaste.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 3511abbb9..e4c1c7080 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://github.com/GoldenSpringness/ProxmoxVED/raw/main/misc/build.func) +source <(curl -s https://github.com/GoldenSpringness/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE From ddd2b951111c82e57a0aae795e8b02e5e400a13a Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 01:34:50 +0300 Subject: [PATCH 21/34] test7 --- ct/rustypaste.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index e4c1c7080..4ec9ad873 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://github.com/GoldenSpringness/ProxmoxVED/main/misc/build.func) +source <(curl -s raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE From 27407cc28a9ec4adcdfb409b429af7aeb7006d6a Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 01:39:14 +0300 Subject: [PATCH 22/34] test8 --- ct/rustypaste.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 4ec9ad873..a69edc715 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/feature/rustypaste/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE From 2042551453622d73924931a2a18b9fc90467d3c1 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 01:43:16 +0300 Subject: [PATCH 23/34] fixed some linking problems --- misc/build.func | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index b62cce8e7..0d93c48c7 100644 --- a/misc/build.func +++ b/misc/build.func @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3286,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) From 41b2410f5b2b829bd17a07dba904f2acae9f3e83 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 02:08:18 +0300 Subject: [PATCH 24/34] added env vars change to update script --- ct/rustypaste.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index a69edc715..89617bc20 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -45,6 +45,7 @@ function update_script() { CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" + sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml cargo build --locked --release From c2e81abafeb58ecab99cf100468022b847e5f6d7 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 02:21:11 +0300 Subject: [PATCH 25/34] removed local changes --- ct/rustypaste.sh | 2 +- misc/build.func | 20 ++++++++++---------- misc/install.func | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 89617bc20..a28b96f90 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/feature/rustypaste/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness # License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE diff --git a/misc/build.func b/misc/build.func index 0d93c48c7..7ce994d1e 100644 --- a/misc/build.func +++ b/misc/build.func @@ -184,17 +184,17 @@ variables() { # - Initialize error traps after loading # ------------------------------------------------------------------------------ -source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/api.func) +source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/api.func) if command -v curl >/dev/null 2>&1; then - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via curl" elif command -v wget >/dev/null 2>&1; then - source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(wget -qO- raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(wget -qO- https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors #echo "(build.func) Loaded core.func via wget" @@ -2577,7 +2577,7 @@ configure_ssh_settings() { # - Otherwise: shows update/setting menu # ------------------------------------------------------------------------------ start() { - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/tools.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func) if command -v pveversion >/dev/null 2>&1; then install_script || return 0 return 0 @@ -2706,7 +2706,7 @@ build_container() { pushd "$TEMP_DIR" >/dev/null # Unified install.func automatically detects OS type (debian, alpine, fedora, etc.) - export FUNCTIONS_FILE_PATH="$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func)" # Core exports for install.func export DIAGNOSTICS="$DIAGNOSTICS" @@ -3199,7 +3199,7 @@ EOF' set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3286,7 +3286,7 @@ EOF' if [[ "${DEV_MODE_MOTD:-false}" == "true" ]]; then echo -e "${TAB}${HOLD}${DGN}Setting up MOTD and SSH for debugging...${CL}" if pct exec "$CTID" -- bash -c " - source <(curl -fsSL https://raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/install.func) declare -f motd_ssh >/dev/null 2>&1 && motd_ssh || true " >/dev/null 2>&1; then local ct_ip=$(pct exec "$CTID" ip a s dev eth0 2>/dev/null | awk '/inet / {print $2}' | cut -d/ -f1) @@ -4194,7 +4194,7 @@ description() { cat < - Logo + Logo

${APP} LXC

diff --git a/misc/install.func b/misc/install.func index 52e320174..f474b4062 100644 --- a/misc/install.func +++ b/misc/install.func @@ -173,8 +173,8 @@ _bootstrap() { fi # Source core functions - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/core.func) - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/error_handler.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/error_handler.func) load_functions catch_errors } @@ -742,10 +742,10 @@ EOF # Source appropriate tools.func based on OS case "$OS_FAMILY" in alpine) - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/alpine-tools.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/alpine-tools.func) ;; *) - source <(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/misc/tools.func) + source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func) ;; esac } @@ -911,7 +911,7 @@ EOF # Create update script # Use var_os for OS-based containers, otherwise use app name local update_script_name="${var_os:-$app}" - echo "bash -c \"\$(curl -fsSL raw.githubusercontent.com/GoldenSpringness/ProxmoxVED/refs/heads/feature/rustypaste/ct/${update_script_name}.sh)\"" >/usr/bin/update + echo "bash -c \"\$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/ct/${update_script_name}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update # Inject SSH authorized keys if provided From f987c7482d7709f5eb90ebf30cc71cae58a74192 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 17:57:03 +0000 Subject: [PATCH 26/34] Apply suggestions from code review Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- ct/rustypaste.sh | 8 -------- install/rustypaste-install.sh | 24 ++++-------------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index a28b96f90..39b29e4cb 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -30,7 +30,6 @@ function update_script() { fi if check_for_gh_release "rustypaste" "orhun/rustypaste"; then - msg_info "Stopping rustypaste" systemctl stop rustypaste msg_ok "Stopped rustypaste" @@ -40,15 +39,10 @@ function update_script() { msg_ok "Backup Created" msg_info "Updating rustypaste to latest" - cd /opt/rustypaste - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" - sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml - cargo build --locked --release - msg_ok "Updated rustypaste to latest" msg_info "Starting rustypaste" @@ -56,8 +50,6 @@ function update_script() { msg_ok "Started rustypaste" msg_ok "Update Successful" - else - msg_ok "No update required. rustypaste is already at latest" fi exit } diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index d028cbaf2..bab9586d5 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -24,23 +24,13 @@ msg_ok "Dependencies Installed Successfully" RUST_VERSION="1.92.0" setup_rust -msg_info "Setting up rustypaste" - fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" +msg_info "Setting up rustypaste" cd /opt/rustypaste - sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml - -msg_info "Compiling rustypaste" cargo build --locked --release - -if [[ ! -f "/opt/rustypaste/target/release/rustypaste" ]]; then - msg_error "Cargo build failed" - exit -fi - -msg_ok "Setting up rustypaste is Done!" +msg_ok "Set up rustypaste" msg_info "Creating Service" cat </etc/systemd/system/rustypaste.service @@ -57,15 +47,9 @@ Restart=always WantedBy=multi-user.target EOF -systemctl enable -q --now rustypaste.service +systemctl enable -q --now rustypaste msg_ok "Created Service" -msg_ok "RustyPaste is Running!" - motd_ssh customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" +cleanup_lxc From 54c89eb4fb3dadee9e0a2cbea84f1062dde5ee49 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 20:07:31 +0300 Subject: [PATCH 27/34] 2nd review rejects fix - json and apt-get --- frontend/public/json/rustypaste.json | 6 +++--- install/rustypaste-install.sh | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/public/json/rustypaste.json b/frontend/public/json/rustypaste.json index c8cbc59e0..14c35cf2f 100644 --- a/frontend/public/json/rustypaste.json +++ b/frontend/public/json/rustypaste.json @@ -10,10 +10,10 @@ "privileged": false, "interface_port": 8000, "documentation": "https://github.com/orhun/rustypaste", - "config_path": "", + "config_path": "/opt/rustypaste/config.toml", "website": "https://github.com/orhun/rustypaste", "logo": "https://github.com/orhun/rustypaste/raw/master/img/rustypaste_logo.png", - "description": "/opt/rustypaste/config.toml", + "description": "Rustypaste is a minimal file upload/pastebin service.", "install_methods": [ { "type": "default", @@ -32,6 +32,6 @@ "password": null }, "notes": [ - "When updating the script it will backup the whole project, make sure to extract it to a safe location or remove", + "When updating the script it will backup the whole project including all the uploaded files, make sure to extract it to a safe location or remove", ] } diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index bab9586d5..e2c30d3f9 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -15,8 +15,7 @@ update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ - curl \ +$STD apt install -y \ git \ build-essential \ ca-certificates From 7b4785ad3bcbbc24f908d4a129f9da1e02f2bc63 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 23:07:28 +0300 Subject: [PATCH 28/34] removed git installation --- install/rustypaste-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index e2c30d3f9..76349c872 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - git \ build-essential \ ca-certificates msg_ok "Dependencies Installed Successfully" From 262d82117224c9ad1517273de1ae44f44494c436 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Tue, 23 Dec 2025 21:08:07 +0000 Subject: [PATCH 29/34] Apply suggestions from code review Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- install/rustypaste-install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index 76349c872..808fa08a7 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -13,7 +13,6 @@ setting_up_container network_check update_os - msg_info "Installing Dependencies" $STD apt install -y \ build-essential \ @@ -21,7 +20,6 @@ $STD apt install -y \ msg_ok "Dependencies Installed Successfully" RUST_VERSION="1.92.0" setup_rust - fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" msg_info "Setting up rustypaste" @@ -44,7 +42,6 @@ Restart=always [Install] WantedBy=multi-user.target EOF - systemctl enable -q --now rustypaste msg_ok "Created Service" From 5fa8f5433af1bc33a5b7c464adc29c5434c61c85 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Wed, 24 Dec 2025 02:28:37 +0300 Subject: [PATCH 30/34] Added to cargo build --- ct/rustypaste.sh | 2 +- install/rustypaste-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 39b29e4cb..46e03cc80 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -42,7 +42,7 @@ function update_script() { cd /opt/rustypaste CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml - cargo build --locked --release + $STD cargo build --locked --release msg_ok "Updated rustypaste to latest" msg_info "Starting rustypaste" diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index 808fa08a7..188d5b47d 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -25,7 +25,7 @@ fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" " msg_info "Setting up rustypaste" cd /opt/rustypaste sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml -cargo build --locked --release +$STD cargo build --locked --release msg_ok "Set up rustypaste" msg_info "Creating Service" From 938a570e7e77c14796d3af10854dea110e1362b9 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:32:52 +0100 Subject: [PATCH 31/34] small fixes --- ct/rustypaste.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/rustypaste.sh b/ct/rustypaste.sh index 46e03cc80..527a7b6bd 100644 --- a/ct/rustypaste.sh +++ b/ct/rustypaste.sh @@ -2,7 +2,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness -# License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/orhun/rustypaste APP="rustypaste" @@ -38,17 +38,17 @@ function update_script() { tar -czf "/opt/rustypaste_backup_$(date +%F).tar.gz" "/opt/rustypaste/upload" msg_ok "Backup Created" - msg_info "Updating rustypaste to latest" - cd /opt/rustypaste CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" + + msg_info "Updating rustypaste" + cd /opt/rustypaste sed -i 's|^address = ".*"|address = "0.0.0.0:8000"|' config.toml $STD cargo build --locked --release - msg_ok "Updated rustypaste to latest" - + msg_ok "Updated rustypaste" + msg_info "Starting rustypaste" systemctl start rustypaste msg_ok "Started rustypaste" - msg_ok "Update Successful" fi exit From 35bb3bbbfc2ff06127a62e9004d2353ea8d7ceeb Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:33:34 +0100 Subject: [PATCH 32/34] fix url --- install/rustypaste-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index 188d5b47d..90103851e 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -2,7 +2,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: GoldenSpringness -# License: MIT | https://github.com/GoldenSpringness/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/orhun/rustypaste source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" From 15b42cdc9fe5bfa58662e310c2acae99d1fbf8c1 Mon Sep 17 00:00:00 2001 From: GoldenSpring Date: Wed, 24 Dec 2025 19:24:13 +0000 Subject: [PATCH 33/34] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/rustypaste-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install/rustypaste-install.sh b/install/rustypaste-install.sh index 90103851e..75f65465d 100644 --- a/install/rustypaste-install.sh +++ b/install/rustypaste-install.sh @@ -14,13 +14,11 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt install -y \ - build-essential \ - ca-certificates +$STD apt install -y build-essential msg_ok "Dependencies Installed Successfully" RUST_VERSION="1.92.0" setup_rust -fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" "latest" "/opt/rustypaste" +fetch_and_deploy_gh_release "rustypaste" "orhun/rustypaste" "tarball" msg_info "Setting up rustypaste" cd /opt/rustypaste From 30634376e81700994c4798a6d8a991ccf2243e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 24 Dec 2025 20:57:45 +0100 Subject: [PATCH 34/34] Update notes structure in rustypaste.json --- frontend/public/json/rustypaste.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/public/json/rustypaste.json b/frontend/public/json/rustypaste.json index 14c35cf2f..ac81889d5 100644 --- a/frontend/public/json/rustypaste.json +++ b/frontend/public/json/rustypaste.json @@ -32,6 +32,9 @@ "password": null }, "notes": [ - "When updating the script it will backup the whole project including all the uploaded files, make sure to extract it to a safe location or remove", + { + "text": "When updating the script it will backup the whole project including all the uploaded files, make sure to extract it to a safe location or remove", + "type": "info" + } ] }