diff --git a/ct/headers/pve-scripts-local b/ct/headers/pve-scripts-local new file mode 100644 index 000000000..2ec5b8b78 --- /dev/null +++ b/ct/headers/pve-scripts-local @@ -0,0 +1,6 @@ + ____ _ ________ _____ _ __ __ __ + / __ \ | / / ____/ / ___/__________(_)___ / /______ / / ____ _________ _/ / + / /_/ / | / / __/______\__ \/ ___/ ___/ / __ \/ __/ ___/_____/ / / __ \/ ___/ __ `/ / + / ____/| |/ / /__/_____/__/ / /__/ / / / /_/ / /_(__ )_____/ /___/ /_/ / /__/ /_/ / / +/_/ |___/_____/ /____/\___/_/ /_/ .___/\__/____/ /_____/\____/\___/\__,_/_/ + /_/ diff --git a/ct/pve-scripts-local.sh b/ct/pve-scripts-local.sh new file mode 100644 index 000000000..f796cc453 --- /dev/null +++ b/ct/pve-scripts-local.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: michelroegl-brunner +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.debian.org/ + +APP="PVE-Scripts-Local" +var_tags="${var_tags:-pve-scritps-local}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +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 /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "No Update function implementd" + 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}" diff --git a/frontend/public/json/pve-scripts-local.json b/frontend/public/json/pve-scripts-local.json new file mode 100644 index 000000000..c8d5061fa --- /dev/null +++ b/frontend/public/json/pve-scripts-local.json @@ -0,0 +1,35 @@ +{ + "name": "PVEScriptsLocal", + "slug": "pve-scripts-local", + "categories": [ + 1 + ], + "date_created": "2025-10-03", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 3000, + "documentation": "https://github.com/community-scripts/ProxmoxVE-Local", + "config_path": "/opt/PVEScripts-Local/.env", + "website": "https://community-scripts.github.io/ProxmoxVE", + "logo": "https://community-scripts.github.io/ProxmoxVE/logo.png", + "description": "A modern web-based management interface for Proxmox VE (PVE) helper scripts. This tool provides a user-friendly way to discover, download, and execute community-sourced Proxmox scripts locally with real-time terminal output streaming.", + "install_methods": [ + { + "type": "default", + "script": "ct/pve-scripts-local.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 4, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/pve-scripts-local-install.sh b/install/pve-scripts-local-install.sh new file mode 100644 index 000000000..6603de563 --- /dev/null +++ b/install/pve-scripts-local-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: michelroegl-brunner +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get update +$STD apt-get install -y \ + build-essential \ + sshpass \ + rsync \ + expect +msg_ok "Dependencies installed." + +NODE_VERSION=22 setup_nodejs +fetch_and_deploy_gh_release "ProxmoxVE-Local" "community-scripts/ProxmoxVE-Local" + +msg_info "Installing PVE Scripts local" +cd /opt/ProxmoxVE-Local +$STD npm install +cp .env.example .env +mkdir -p data +chmod 755 data +$STD npm run build +msg_ok "Installed PVE Scripts local" + +msg_info "Creating Service" +cat </etc/systemd/system/pvescriptslocal.service +[Unit] +Description=PVEScriptslocal Service +After=network.target + +[Service] +WorkingDirectory=/opt/ProxmoxVE-Local +ExecStart=/usr/bin/npm start +Restart=always +RestartSec=10 +Environment=NODE_ENV=production +User=root + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now pvescriptslocal +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"