switch urls back to github (due slow gitea syncs)
This commit is contained in:
@@ -172,6 +172,7 @@ var_unprivileged="1" # 1=unprivileged (secure), 0=privileged (rarely n
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Variable Naming Convention**:
|
**Variable Naming Convention**:
|
||||||
|
|
||||||
- Variables exposed to user: `var_*` (e.g., `var_cpu`, `var_hostname`, `var_ssh`)
|
- Variables exposed to user: `var_*` (e.g., `var_cpu`, `var_hostname`, `var_ssh`)
|
||||||
- Internal variables: lowercase (e.g., `container_id`, `app_version`)
|
- Internal variables: lowercase (e.g., `container_id`, `app_version`)
|
||||||
|
|
||||||
@@ -273,6 +274,7 @@ echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
|||||||
**Triggered by**: Called automatically at script start
|
**Triggered by**: Called automatically at script start
|
||||||
|
|
||||||
**Behavior**:
|
**Behavior**:
|
||||||
|
|
||||||
1. Parse command-line arguments (if any)
|
1. Parse command-line arguments (if any)
|
||||||
2. Generate random UUID for session tracking
|
2. Generate random UUID for session tracking
|
||||||
3. Load container storage from Proxmox
|
3. Load container storage from Proxmox
|
||||||
@@ -284,6 +286,7 @@ echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
|||||||
**Purpose**: Launch the container creation menu with 5 installation modes
|
**Purpose**: Launch the container creation menu with 5 installation modes
|
||||||
|
|
||||||
**Menu Options**:
|
**Menu Options**:
|
||||||
|
|
||||||
```
|
```
|
||||||
1. Default Installation (Quick setup, predefined settings)
|
1. Default Installation (Quick setup, predefined settings)
|
||||||
2. Advanced Installation (19-step wizard with full control)
|
2. Advanced Installation (19-step wizard with full control)
|
||||||
@@ -297,6 +300,7 @@ echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
|||||||
**Purpose**: Main orchestrator for LXC container creation
|
**Purpose**: Main orchestrator for LXC container creation
|
||||||
|
|
||||||
**Operations**:
|
**Operations**:
|
||||||
|
|
||||||
1. Validates all variables
|
1. Validates all variables
|
||||||
2. Creates LXC container via `pct create`
|
2. Creates LXC container via `pct create`
|
||||||
3. Executes `install/AppName-install.sh` inside container
|
3. Executes `install/AppName-install.sh` inside container
|
||||||
@@ -398,6 +402,7 @@ msg_ok "Completed successfully!\n"
|
|||||||
**Symptom**: `pct create` exits with error code 209
|
**Symptom**: `pct create` exits with error code 209
|
||||||
|
|
||||||
**Solution**:
|
**Solution**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check existing containers
|
# Check existing containers
|
||||||
pct list | grep CTID
|
pct list | grep CTID
|
||||||
@@ -411,6 +416,7 @@ pct destroy CTID
|
|||||||
### Update Function Doesn't Detect New Version
|
### Update Function Doesn't Detect New Version
|
||||||
|
|
||||||
**Debug**:
|
**Debug**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check version file
|
# Check version file
|
||||||
cat /opt/AppName_version.txt
|
cat /opt/AppName_version.txt
|
||||||
@@ -426,6 +432,7 @@ curl -fsSL https://api.github.com/repos/user/repo/releases/latest | grep tag_nam
|
|||||||
Before submitting a PR:
|
Before submitting a PR:
|
||||||
|
|
||||||
### Script Structure
|
### Script Structure
|
||||||
|
|
||||||
- [ ] Shebang is `#!/usr/bin/env bash`
|
- [ ] Shebang is `#!/usr/bin/env bash`
|
||||||
- [ ] Imports `build.func` from community-scripts repo
|
- [ ] Imports `build.func` from community-scripts repo
|
||||||
- [ ] Copyright header with author and source URL
|
- [ ] Copyright header with author and source URL
|
||||||
@@ -433,17 +440,20 @@ Before submitting a PR:
|
|||||||
- [ ] `var_tags` are semicolon-separated (no spaces)
|
- [ ] `var_tags` are semicolon-separated (no spaces)
|
||||||
|
|
||||||
### Default Values
|
### Default Values
|
||||||
|
|
||||||
- [ ] `var_cpu` set appropriately (2-4 for most apps)
|
- [ ] `var_cpu` set appropriately (2-4 for most apps)
|
||||||
- [ ] `var_ram` set appropriately (1024-4096 MB minimum)
|
- [ ] `var_ram` set appropriately (1024-4096 MB minimum)
|
||||||
- [ ] `var_disk` sufficient for app + data (5-20 GB)
|
- [ ] `var_disk` sufficient for app + data (5-20 GB)
|
||||||
- [ ] `var_os` is realistic
|
- [ ] `var_os` is realistic
|
||||||
|
|
||||||
### Functions
|
### Functions
|
||||||
|
|
||||||
- [ ] `update_script()` implemented
|
- [ ] `update_script()` implemented
|
||||||
- [ ] Update function checks if app installed
|
- [ ] Update function checks if app installed
|
||||||
- [ ] Proper error handling with `msg_error`
|
- [ ] Proper error handling with `msg_error`
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
- [ ] Script tested with default installation
|
- [ ] Script tested with default installation
|
||||||
- [ ] Script tested with advanced (19-step) installation
|
- [ ] Script tested with advanced (19-step) installation
|
||||||
- [ ] Update function tested on existing installation
|
- [ ] Update function tested on existing installation
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
if ! command -v curl >/dev/null 2>&1; then
|
if ! command -v curl >/dev/null 2>&1; then
|
||||||
apk update && apk add curl >/dev/null 2>&1
|
apk update && apk add curl >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main}"
|
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
|
||||||
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/core.func")
|
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/core.func")
|
||||||
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/error_handler.func")
|
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/error_handler.func")
|
||||||
load_functions
|
load_functions
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: tteck (tteckster) | MickLesk | michelroegl-brunner
|
# Author: tteck (tteckster) | MickLesk | michelroegl-brunner
|
||||||
# License: MIT | https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/LICENSE
|
# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# BUILD.FUNC - LXC CONTAINER BUILD & CONFIGURATION
|
# BUILD.FUNC - LXC CONTAINER BUILD & CONFIGURATION
|
||||||
@@ -85,7 +85,7 @@ variables() {
|
|||||||
|
|
||||||
# Configurable base URL for development — override with COMMUNITY_SCRIPTS_URL
|
# Configurable base URL for development — override with COMMUNITY_SCRIPTS_URL
|
||||||
# See docs/DEV_MODE.md for details
|
# See docs/DEV_MODE.md for details
|
||||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main}"
|
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
|
||||||
|
|
||||||
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/api.func")
|
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/api.func")
|
||||||
|
|
||||||
@@ -6006,7 +6006,7 @@ description() {
|
|||||||
cat <<EOF
|
cat <<EOF
|
||||||
<div align='center'>
|
<div align='center'>
|
||||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||||
<img src='https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2>
|
<h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# License: MIT | https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/LICENSE
|
# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# CORE FUNCTIONS - LXC CONTAINER UTILITIES
|
# CORE FUNCTIONS - LXC CONTAINER UTILITIES
|
||||||
@@ -491,7 +491,6 @@ log_section() {
|
|||||||
# - Executes command with output redirected to active log file
|
# - Executes command with output redirected to active log file
|
||||||
# - On error: displays last 20 lines of log and exits with original exit code
|
# - On error: displays last 20 lines of log and exits with original exit code
|
||||||
|
|
||||||
|
|
||||||
# - Temporarily disables error trap to capture exit code correctly
|
# - Temporarily disables error trap to capture exit code correctly
|
||||||
# - Sources explain_exit_code() for detailed error messages
|
# - Sources explain_exit_code() for detailed error messages
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -791,7 +790,7 @@ exit_script() {
|
|||||||
get_header() {
|
get_header() {
|
||||||
local app_name=$(echo "${APP,,}" | tr -d ' ')
|
local app_name=$(echo "${APP,,}" | tr -d ' ')
|
||||||
local app_type=${APP_TYPE:-ct} # Default to 'ct' if not set
|
local app_type=${APP_TYPE:-ct} # Default to 'ct' if not set
|
||||||
local header_url="https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/${app_type}/headers/${app_name}"
|
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/${app_type}/headers/${app_name}"
|
||||||
local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}"
|
local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}"
|
||||||
|
|
||||||
mkdir -p "$(dirname "$local_header_path")"
|
mkdir -p "$(dirname "$local_header_path")"
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ _bootstrap() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Configurable base URL for development — override with COMMUNITY_SCRIPTS_URL
|
# Configurable base URL for development — override with COMMUNITY_SCRIPTS_URL
|
||||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main}"
|
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
|
||||||
|
|
||||||
# Source core functions
|
# Source core functions
|
||||||
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/core.func")
|
source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/core.func")
|
||||||
@@ -944,7 +944,7 @@ EOF
|
|||||||
# Create update script
|
# Create update script
|
||||||
# Use var_os for OS-based containers, otherwise use app name
|
# Use var_os for OS-based containers, otherwise use app name
|
||||||
local update_script_name="${var_os:-$app}"
|
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/community-scripts/ProxmoxVE/main/ct/${update_script_name}.sh)\"" >/usr/bin/update
|
||||||
chmod +x /usr/bin/update
|
chmod +x /usr/bin/update
|
||||||
|
|
||||||
# Inject SSH authorized keys if provided
|
# Inject SSH authorized keys if provided
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: MickLesk (CanbiZ)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT | https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/LICENSE
|
# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# VM-APP.FUNC - DEPLOY LXC APPLICATIONS INSIDE VIRTUAL MACHINES
|
# VM-APP.FUNC - DEPLOY LXC APPLICATIONS INSIDE VIRTUAL MACHINES
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# License: MIT | https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/LICENSE
|
# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
SPINNER_PID=""
|
SPINNER_PID=""
|
||||||
@@ -35,7 +35,7 @@ load_functions() {
|
|||||||
get_header() {
|
get_header() {
|
||||||
local app_name=$(echo "${APP,,}" | tr ' ' '-')
|
local app_name=$(echo "${APP,,}" | tr ' ' '-')
|
||||||
local app_type=${APP_TYPE:-vm}
|
local app_type=${APP_TYPE:-vm}
|
||||||
local header_url="https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/${app_type}/headers/${app_name}"
|
local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/${app_type}/headers/${app_name}"
|
||||||
local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}"
|
local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}"
|
||||||
|
|
||||||
mkdir -p "$(dirname "$local_header_path")"
|
mkdir -p "$(dirname "$local_header_path")"
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ function set_ssh_keys() {
|
|||||||
if [ -n "$PASTED_KEY" ]; then
|
if [ -n "$PASTED_KEY" ]; then
|
||||||
if [[ "$PASTED_KEY" == ssh-* || "$PASTED_KEY" == ecdsa-* ]]; then
|
if [[ "$PASTED_KEY" == ssh-* || "$PASTED_KEY" == ecdsa-* ]]; then
|
||||||
[ -z "$SSH_KEYS_FILE" ] && SSH_KEYS_FILE=$(mktemp)
|
[ -z "$SSH_KEYS_FILE" ] && SSH_KEYS_FILE=$(mktemp)
|
||||||
echo "$PASTED_KEY" >> "$SSH_KEYS_FILE"
|
echo "$PASTED_KEY" >>"$SSH_KEYS_FILE"
|
||||||
SSH_KEY_COUNT=$((SSH_KEY_COUNT + 1))
|
SSH_KEY_COUNT=$((SSH_KEY_COUNT + 1))
|
||||||
else
|
else
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID KEY" --msgbox "Key must start with ssh-rsa, ssh-ed25519, ecdsa-, etc." 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "INVALID KEY" --msgbox "Key must start with ssh-rsa, ssh-ed25519, ecdsa-, etc." 8 58
|
||||||
@@ -713,7 +713,7 @@ msg_info "Customizing disk image (installing packages, staging installer)"
|
|||||||
|
|
||||||
# Create the first-boot installer script
|
# Create the first-boot installer script
|
||||||
FIRSTBOOT_SCRIPT=$(mktemp)
|
FIRSTBOOT_SCRIPT=$(mktemp)
|
||||||
cat > "$FIRSTBOOT_SCRIPT" <<'FBEOF'
|
cat >"$FIRSTBOOT_SCRIPT" <<'FBEOF'
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
LOG="/var/log/unifi-os-install.log"
|
LOG="/var/log/unifi-os-install.log"
|
||||||
@@ -792,7 +792,7 @@ FBEOF
|
|||||||
|
|
||||||
# Create the systemd service unit file
|
# Create the systemd service unit file
|
||||||
FIRSTBOOT_SVC=$(mktemp)
|
FIRSTBOOT_SVC=$(mktemp)
|
||||||
cat > "$FIRSTBOOT_SVC" <<'SVCEOF'
|
cat >"$FIRSTBOOT_SVC" <<'SVCEOF'
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=UniFi OS Server First Boot Installer
|
Description=UniFi OS Server First Boot Installer
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|||||||
Reference in New Issue
Block a user