Changed build and install calls
This commit is contained in:
parent
98105f0ea3
commit
b128fe4312
@ -1,17 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
<<<<<<< HEAD
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: luismco
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Lissy93/web-check
|
||||
=======
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: luismco
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ThePhaseless/Byparr
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
|
||||
APP="Byparr"
|
||||
var_tags="${var_tags:-proxy}"
|
||||
|
||||
@ -13,8 +13,6 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt -y install \
|
||||
xauth \
|
||||
@ -26,7 +24,6 @@ $STD apt -y install \
|
||||
ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
fetch_and_deploy_gh_release "Byparr" "ThePhaseless/Byparr"
|
||||
|
||||
setup_uv
|
||||
@ -36,34 +33,21 @@ cat <<EOF >/etc/systemd/system/byparr.service
|
||||
[Unit]
|
||||
Description=Byparr
|
||||
After=network.target
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/Byparr
|
||||
ExecStart=/usr/local/bin/uv run python3 main.py
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
<<<<<<< HEAD
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now byparr
|
||||
=======
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
cleanup_lxc
|
||||
|
||||
systemctl enable -q --now byparr
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
|
||||
@ -184,17 +184,17 @@ variables() {
|
||||
# - Initialize error traps after loading
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/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/luismco/ProxmoxVED/refs/heads/byparr/misc/core.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/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://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/misc/core.func)
|
||||
source <(wget -qO- https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/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"
|
||||
@ -2285,7 +2285,7 @@ configure_ssh_settings() {
|
||||
# - Otherwise: shows update/setting menu
|
||||
# ------------------------------------------------------------------------------
|
||||
start() {
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/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
|
||||
@ -2405,9 +2405,9 @@ build_container() {
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd "$TEMP_DIR" >/dev/null
|
||||
if [ "$var_os" == "alpine" ]; then
|
||||
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/misc/alpine-install.func)"
|
||||
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/alpine-install.func)"
|
||||
else
|
||||
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/misc/install.func)"
|
||||
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/install.func)"
|
||||
fi
|
||||
|
||||
# Core exports for install.func
|
||||
@ -2822,8 +2822,6 @@ EOF'
|
||||
install_ssh_keys_into_ct
|
||||
|
||||
# Run application installer
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
# NOTE: We disable error handling here because:
|
||||
# 1. Container errors are caught by error_handler INSIDE container
|
||||
# 2. Container creates flag file with exit code
|
||||
@ -2846,13 +2844,6 @@ EOF'
|
||||
if pct exec "$CTID" -- test -f "$error_flag" 2>/dev/null; then
|
||||
install_exit_code=$(pct exec "$CTID" -- cat "$error_flag" 2>/dev/null || echo "1")
|
||||
pct exec "$CTID" -- rm -f "$error_flag" 2>/dev/null || true
|
||||
=======
|
||||
if ! lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/install/${var_install}.sh)"; then
|
||||
local exit_code=$?
|
||||
# Try to copy installation log from container before exiting
|
||||
if [[ -n "$CTID" && -n "${SESSION_ID:-}" ]]; then
|
||||
pct pull "$CTID" "/root/.install-${SESSION_ID}.log" "/tmp/install-${SESSION_ID}.log" 2>/dev/null || true
|
||||
>>>>>>> 1b856490 (Added install and ct files)
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -2869,11 +2860,6 @@ EOF'
|
||||
local build_log_copied=false
|
||||
local install_log_copied=false
|
||||
|
||||
=======
|
||||
if ! lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/install/${var_install}.sh)"; then
|
||||
local exit_code=$?
|
||||
# Try to copy installation log from container before exiting
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
if [[ -n "$CTID" && -n "${SESSION_ID:-}" ]]; then
|
||||
# Copy BUILD_LOG (creation log) if it exists
|
||||
if [[ -f "${BUILD_LOG}" ]]; then
|
||||
|
||||
@ -33,8 +33,8 @@ if ! command -v curl >/dev/null 2>&1; then
|
||||
apt-get update >/dev/null 2>&1
|
||||
apt-get install -y curl >/dev/null 2>&1
|
||||
fi
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/misc/core.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/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
|
||||
|
||||
@ -191,8 +191,6 @@ else
|
||||
echo -n "DIRECT"
|
||||
fi
|
||||
EOF
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
chmod +x /usr/local/bin/apt-proxy-detect.sh
|
||||
fi
|
||||
$STD apt-get update
|
||||
@ -200,20 +198,6 @@ EOF
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Container OS"
|
||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/tools.func)
|
||||
=======
|
||||
=======
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
chmod +x /usr/local/bin/apt-proxy-detect.sh
|
||||
fi
|
||||
$STD apt-get update
|
||||
$STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Container OS"
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/luismco/ProxmoxVED/refs/heads/byparr/misc/tools.func)
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> 1b856490 (Added install and ct files)
|
||||
=======
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
@ -288,8 +272,6 @@ customize() {
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
|
||||
EOF
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
systemctl daemon-reload
|
||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||
msg_ok "Customized Container"
|
||||
@ -302,23 +284,4 @@ EOF
|
||||
chmod 700 /root/.ssh
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
=======
|
||||
=======
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
systemctl daemon-reload
|
||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||
msg_ok "Customized Container"
|
||||
fi
|
||||
echo "bash -c \"\$(curl -fsSL https://github.com/luismco/ProxmoxVED/refs/heads/byparr/ct/${app}.sh)\"" >/usr/bin/update
|
||||
chmod +x /usr/bin/update
|
||||
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||
mkdir -p /root/.ssh
|
||||
echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys
|
||||
chmod 700 /root/.ssh
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
fi
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> 1b856490 (Added install and ct files)
|
||||
=======
|
||||
>>>>>>> 705b0b3ed245a44466c93f68bc8f966962c11eee
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user