diff --git a/ct/nodecasttv.sh b/ct/nodecasttv.sh new file mode 100644 index 000000000..71e2c6b38 --- /dev/null +++ b/ct/nodecasttv.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/nodecast-tv/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: luismco +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/BlessedRebuS/Krawl + +APP="Nodecasttv" +var_tags="${var_tags:-proxy}" +var_cpu="${var_cpu:-2}" +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/nodecast-tv ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "nodecast-tv" "technomancer702/nodecast-tv"; then + msg_info "Stopping Service" + systemctl stop nodecast-tv + msg_ok "Stopped Service" + + fetch_and_deploy_gh_release "nodecast-tv" "technomancer702/nodecast-tv" + + msg_info "Starting Service" + systemctl start nodecast-tv + 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}" + diff --git a/install/nodecasttv-install.sh b/install/nodecasttv-install.sh new file mode 100644 index 000000000..c295adcb9 --- /dev/null +++ b/install/nodecasttv-install.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: luismco +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/ThePhaseless/Byparr + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +fetch_and_deploy_gh_release "nodecast-tv" "technomancer702/nodecast-tv" +setup_nodejs + +msg_info "Creating Service" +cat </etc/systemd/system/nodecast-tv.service +[Unit] +Description=nodecast-tv +After=network.target +Wants=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/nodecast-tv +ExecStart=/bin/bash -c 'exec /bin/npm install && /bin/npm run dev' +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now nodecast-tv +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc diff --git a/misc/build.func b/misc/build.func index 06923e925..6abdb8950 100644 --- a/misc/build.func +++ b/misc/build.func @@ -2828,7 +2828,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/luismco/ProxmoxVED/refs/heads/krawl/misc/install.func)" # Core exports for install.func export DIAGNOSTICS="$DIAGNOSTICS" @@ -3419,7 +3419,7 @@ chmod +x /etc/profile.d/term.sh" || true set +Eeuo pipefail # Disable ALL error handling temporarily trap - ERR # Remove ERR trap completely - lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/${var_install}.sh)" + lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/krawl/install/${var_install}.sh)" local lxc_exit=$? set -Eeuo pipefail # Re-enable error handling @@ -3506,7 +3506,7 @@ chmod +x /etc/profile.d/term.sh" || true 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://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func) + source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/krawl/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)