First try
This commit is contained in:
parent
17d04e2d1d
commit
d9639c8584
54
ct/nodecasttv.sh
Normal file
54
ct/nodecasttv.sh
Normal file
@ -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}"
|
||||
|
||||
41
install/nodecasttv-install.sh
Normal file
41
install/nodecasttv-install.sh
Normal file
@ -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 <<EOF >/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
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user