mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-05 12:53:27 +01:00
Compare commits
1 Commits
automated/
...
feat/cloud
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6077c850ea |
@@ -398,8 +398,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-02-05
|
||||
|
||||
## 2026-02-04
|
||||
|
||||
### 🆕 New Scripts
|
||||
@@ -409,11 +407,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Add log directory and permissions for koillection [@shineangelic](https://github.com/shineangelic) ([#11553](https://github.com/community-scripts/ProxmoxVE/pull/11553))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- [FIX] Scanopy: ensure Scanopy Daemon update [@vhsdream](https://github.com/vhsdream) ([#11541](https://github.com/community-scripts/ProxmoxVE/pull/11541))
|
||||
- Immich: pin version to 2.5.3 [@vhsdream](https://github.com/vhsdream) ([#11515](https://github.com/community-scripts/ProxmoxVE/pull/11515))
|
||||
|
||||
### 💾 Core
|
||||
@@ -434,10 +429,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- fix(frontend): implement weighted search scoring for command menu [@ls-root](https://github.com/ls-root) ([#11534](https://github.com/community-scripts/ProxmoxVE/pull/11534))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- [FIX] Immich Public Proxy docs link [@vhsdream](https://github.com/vhsdream) ([#11543](https://github.com/community-scripts/ProxmoxVE/pull/11543))
|
||||
|
||||
## 2026-02-03
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -59,8 +59,6 @@ function update_script() {
|
||||
$STD yarn install
|
||||
$STD yarn build
|
||||
mkdir -p /opt/koillection/public/uploads
|
||||
mkdir -p /opt/koillection/var/log
|
||||
chown -R www-data:www-data /opt/koillection/var/log
|
||||
chown -R www-data:www-data /opt/koillection/public/uploads
|
||||
rm -r /opt/koillection-backup
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "Scanopy" "scanopy/scanopy"; then
|
||||
if check_for_gh_release "scanopy" "scanopy/scanopy"; then
|
||||
msg_info "Stopping services"
|
||||
systemctl stop scanopy-server
|
||||
[[ -f /etc/systemd/system/scanopy-daemon.service ]] && systemctl stop scanopy-daemon
|
||||
@@ -40,7 +40,7 @@ function update_script() {
|
||||
[[ -f /opt/scanopy/oidc.toml ]] && cp /opt/scanopy/oidc.toml /opt/scanopy.oidc.toml
|
||||
msg_ok "Backed up configurations"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy"
|
||||
|
||||
ensure_dependencies pkg-config libssl-dev
|
||||
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
|
||||
@@ -61,22 +61,19 @@ function update_script() {
|
||||
$STD npm run build
|
||||
msg_ok "Created frontend UI"
|
||||
|
||||
msg_info "Building Scanopy Server (patience)"
|
||||
msg_info "Building scanopy-server (patience)"
|
||||
cd /opt/scanopy/backend
|
||||
$STD cargo build --release --bin server
|
||||
mv ./target/release/server /usr/bin/scanopy-server
|
||||
msg_ok "Built Scanopy Server"
|
||||
msg_ok "Built scanopy-server"
|
||||
|
||||
if [[ -f /etc/systemd/system/scanopy-daemon.service ]]; then
|
||||
fetch_and_deploy_gh_release "Scanopy Daemon" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-amd64"
|
||||
mv "/usr/local/bin/Scanopy Daemon" /usr/local/bin/scanopy-daemon
|
||||
rm -f /usr/bin/scanopy-daemon ~/configure_daemon.sh
|
||||
[[ -f /etc/systemd/system/scanopy-daemon.service ]] &&
|
||||
fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-amd64" &&
|
||||
rm -f /usr/bin/scanopy-daemon ~/configure_daemon.sh &&
|
||||
sed -i -e 's|usr/bin|usr/local/bin|' \
|
||||
-e 's/push/daemon_poll/' \
|
||||
-e 's/pull/server_poll/' /etc/systemd/system/scanopy-daemon.service
|
||||
-e 's/pull/server_poll/' /etc/systemd/system/scanopy-daemon.service &&
|
||||
systemctl daemon-reload
|
||||
msg_ok "Updated Scanopy Daemon"
|
||||
fi
|
||||
|
||||
msg_info "Starting services"
|
||||
systemctl start scanopy-server
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated": "2026-02-05T06:22:20Z",
|
||||
"generated": "2026-02-04T18:17:33Z",
|
||||
"versions": [
|
||||
{
|
||||
"slug": "2fauth",
|
||||
@@ -221,9 +221,9 @@
|
||||
{
|
||||
"slug": "cronicle",
|
||||
"repo": "jhuckaby/Cronicle",
|
||||
"version": "v0.9.103",
|
||||
"version": "v0.9.102",
|
||||
"pinned": false,
|
||||
"date": "2026-02-05T03:09:04Z"
|
||||
"date": "2025-12-19T03:45:13Z"
|
||||
},
|
||||
{
|
||||
"slug": "cryptpad",
|
||||
@@ -445,9 +445,9 @@
|
||||
{
|
||||
"slug": "headscale",
|
||||
"repo": "juanfont/headscale",
|
||||
"version": "v0.28.0",
|
||||
"version": "v0.27.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-04T20:40:23Z"
|
||||
"date": "2025-11-11T19:32:29Z"
|
||||
},
|
||||
{
|
||||
"slug": "healthchecks",
|
||||
@@ -494,9 +494,9 @@
|
||||
{
|
||||
"slug": "homepage",
|
||||
"repo": "gethomepage/homepage",
|
||||
"version": "v1.10.0",
|
||||
"version": "v1.9.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-05T06:17:32Z"
|
||||
"date": "2026-01-19T05:46:09Z"
|
||||
},
|
||||
{
|
||||
"slug": "homer",
|
||||
@@ -515,9 +515,9 @@
|
||||
{
|
||||
"slug": "huntarr",
|
||||
"repo": "plexguide/Huntarr.io",
|
||||
"version": "9.2.0",
|
||||
"version": "9.1.12",
|
||||
"pinned": false,
|
||||
"date": "2026-02-05T04:18:08Z"
|
||||
"date": "2026-02-04T14:28:36Z"
|
||||
},
|
||||
{
|
||||
"slug": "inspircd",
|
||||
@@ -536,16 +536,16 @@
|
||||
{
|
||||
"slug": "invoiceninja",
|
||||
"repo": "invoiceninja/invoiceninja",
|
||||
"version": "v5.12.55",
|
||||
"version": "v5.12.53",
|
||||
"pinned": false,
|
||||
"date": "2026-02-05T01:06:15Z"
|
||||
"date": "2026-02-04T00:52:01Z"
|
||||
},
|
||||
{
|
||||
"slug": "jackett",
|
||||
"repo": "Jackett/Jackett",
|
||||
"version": "v0.24.1032",
|
||||
"version": "v0.24.1027",
|
||||
"pinned": false,
|
||||
"date": "2026-02-05T05:55:27Z"
|
||||
"date": "2026-02-04T05:56:22Z"
|
||||
},
|
||||
{
|
||||
"slug": "joplin-server",
|
||||
@@ -746,9 +746,9 @@
|
||||
{
|
||||
"slug": "mealie",
|
||||
"repo": "mealie-recipes/mealie",
|
||||
"version": "v3.10.2",
|
||||
"version": "v3.10.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-04T23:32:32Z"
|
||||
"date": "2026-02-03T01:04:38Z"
|
||||
},
|
||||
{
|
||||
"slug": "mediamanager",
|
||||
@@ -781,9 +781,9 @@
|
||||
{
|
||||
"slug": "metube",
|
||||
"repo": "alexta69/metube",
|
||||
"version": "2026.02.04",
|
||||
"version": "2026.02.03",
|
||||
"pinned": false,
|
||||
"date": "2026-02-04T20:01:18Z"
|
||||
"date": "2026-02-03T21:49:49Z"
|
||||
},
|
||||
{
|
||||
"slug": "miniflux",
|
||||
@@ -1096,9 +1096,9 @@
|
||||
{
|
||||
"slug": "pulse",
|
||||
"repo": "rcourtman/Pulse",
|
||||
"version": "v5.1.2",
|
||||
"version": "v5.1.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-05T00:18:57Z"
|
||||
"date": "2026-02-04T17:43:59Z"
|
||||
},
|
||||
{
|
||||
"slug": "pve-scripts-local",
|
||||
@@ -1271,9 +1271,9 @@
|
||||
{
|
||||
"slug": "speedtest-tracker",
|
||||
"repo": "alexjustesen/speedtest-tracker",
|
||||
"version": "v1.13.8",
|
||||
"version": "v1.13.7",
|
||||
"pinned": false,
|
||||
"date": "2026-02-04T19:24:23Z"
|
||||
"date": "2026-02-04T16:47:42Z"
|
||||
},
|
||||
{
|
||||
"slug": "spoolman",
|
||||
@@ -1292,9 +1292,9 @@
|
||||
{
|
||||
"slug": "stirling-pdf",
|
||||
"repo": "Stirling-Tools/Stirling-PDF",
|
||||
"version": "v2.4.4",
|
||||
"version": "v2.4.3",
|
||||
"pinned": false,
|
||||
"date": "2026-02-05T00:15:53Z"
|
||||
"date": "2026-01-31T22:19:14Z"
|
||||
},
|
||||
{
|
||||
"slug": "streamlink-webui",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://github.com/alangrainger/immich-public-proxy/tree/main/docs",
|
||||
"documentation": "https://github.com/alangrainger/immich-public-proxy/docs",
|
||||
"website": "https://github.com/alangrainger/immich-public-proxy",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/immich-public-proxy.webp",
|
||||
"config_path": "/opt/immich-proxy/app/.env",
|
||||
|
||||
@@ -23,7 +23,7 @@ msg_ok "Installed Dependencies"
|
||||
PG_VERSION=17 setup_postgresql
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
PG_DB_NAME="scanopy_db" PG_DB_USER="scanopy" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
|
||||
fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy"
|
||||
fetch_and_deploy_gh_release "scanopy" "scanopy/scanopy" "tarball" "latest" "/opt/scanopy"
|
||||
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
|
||||
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
|
||||
|
||||
@@ -35,11 +35,11 @@ $STD npm ci --no-fund --no-audit
|
||||
$STD npm run build
|
||||
msg_ok "Created frontend UI"
|
||||
|
||||
msg_info "Building Scanopy Server (patience)"
|
||||
msg_info "Building scanopy-server (patience)"
|
||||
cd /opt/scanopy/backend
|
||||
$STD cargo build --release --bin server
|
||||
mv ./target/release/server /usr/bin/scanopy-server
|
||||
msg_ok "Built Scanopy Server"
|
||||
msg_ok "Built scanopy-server"
|
||||
|
||||
msg_info "Configuring server for first-run"
|
||||
cat <<EOF >/opt/scanopy/.env
|
||||
|
||||
@@ -28,13 +28,210 @@
|
||||
# ==============================================================================
|
||||
# These can be overridden before sourcing this library
|
||||
|
||||
# Disable 'unbound variable' errors for this library (restored at end)
|
||||
_OLD_SET_STATE=$(set +o | grep -E 'set -(e|u|o)')
|
||||
set +u
|
||||
|
||||
CLOUDINIT_DEFAULT_USER="${CLOUDINIT_DEFAULT_USER:-root}"
|
||||
CLOUDINIT_DNS_SERVERS="${CLOUDINIT_DNS_SERVERS:-1.1.1.1 8.8.8.8}"
|
||||
CLOUDINIT_SEARCH_DOMAIN="${CLOUDINIT_SEARCH_DOMAIN:-local}"
|
||||
CLOUDINIT_SSH_KEYS="${CLOUDINIT_SSH_KEYS:-/root/.ssh/authorized_keys}"
|
||||
CLOUDINIT_SSH_KEYS="${CLOUDINIT_SSH_KEYS:-}" # Empty by default - user must explicitly provide keys
|
||||
|
||||
# ==============================================================================
|
||||
# SECTION 2: HELPER FUNCTIONS
|
||||
# SECTION 2: SSH KEY DISCOVERY AND SELECTION
|
||||
# ==============================================================================
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# _ci_ssh_extract_keys_from_file - Extracts valid SSH public keys from a file
|
||||
# ------------------------------------------------------------------------------
|
||||
function _ci_ssh_extract_keys_from_file() {
|
||||
local file="$1"
|
||||
[[ -f "$file" && -r "$file" ]] || return 0
|
||||
grep -E '^(ssh-(rsa|ed25519|dss|ecdsa)|ecdsa-sha2-)' "$file" 2>/dev/null || true
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# _ci_ssh_discover_files - Scans standard paths for SSH keys
|
||||
# ------------------------------------------------------------------------------
|
||||
function _ci_ssh_discover_files() {
|
||||
local -a cand=()
|
||||
shopt -s nullglob
|
||||
cand+=(/root/.ssh/authorized_keys /root/.ssh/authorized_keys2)
|
||||
cand+=(/root/.ssh/*.pub)
|
||||
cand+=(/etc/ssh/authorized_keys /etc/ssh/authorized_keys.d/*)
|
||||
shopt -u nullglob
|
||||
printf '%s\0' "${cand[@]}"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# _ci_ssh_build_choices - Builds whiptail checklist from SSH key files
|
||||
#
|
||||
# Sets: CI_SSH_CHOICES (array), CI_SSH_COUNT (int), CI_SSH_MAPFILE (path)
|
||||
# ------------------------------------------------------------------------------
|
||||
function _ci_ssh_build_choices() {
|
||||
local -a files=("$@")
|
||||
CI_SSH_CHOICES=()
|
||||
CI_SSH_COUNT=0
|
||||
CI_SSH_MAPFILE="$(mktemp)"
|
||||
local id key typ fp cmt base
|
||||
|
||||
for f in "${files[@]}"; do
|
||||
[[ -f "$f" && -r "$f" ]] || continue
|
||||
base="$(basename -- "$f")"
|
||||
# Skip known_hosts and private keys
|
||||
case "$base" in
|
||||
known_hosts | known_hosts.* | config) continue ;;
|
||||
id_*) [[ "$f" != *.pub ]] && continue ;;
|
||||
esac
|
||||
|
||||
while IFS= read -r key; do
|
||||
[[ -n "$key" ]] || continue
|
||||
|
||||
typ=""
|
||||
fp=""
|
||||
cmt=""
|
||||
read -r _typ _b64 _cmt <<<"$key"
|
||||
typ="${_typ:-key}"
|
||||
cmt="${_cmt:-}"
|
||||
|
||||
# Get fingerprint via ssh-keygen if available
|
||||
if command -v ssh-keygen >/dev/null 2>&1; then
|
||||
fp="$(printf '%s\n' "$key" | ssh-keygen -lf - 2>/dev/null | awk '{print $2}')"
|
||||
fi
|
||||
|
||||
# Shorten long comments
|
||||
[[ ${#cmt} -gt 40 ]] && cmt="${cmt:0:37}..."
|
||||
|
||||
CI_SSH_COUNT=$((CI_SSH_COUNT + 1))
|
||||
id="K${CI_SSH_COUNT}"
|
||||
echo "${id}|${key}" >>"$CI_SSH_MAPFILE"
|
||||
CI_SSH_CHOICES+=("$id" "[$typ] ${fp:+$fp }${cmt:+$cmt }— ${base}" "OFF")
|
||||
done < <(_ci_ssh_extract_keys_from_file "$f")
|
||||
done
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# configure_cloudinit_ssh_keys - Interactive SSH key selection for Cloud-Init
|
||||
#
|
||||
# Usage: configure_cloudinit_ssh_keys
|
||||
# Sets: CLOUDINIT_SSH_KEYS (path to temporary file with selected keys)
|
||||
# ------------------------------------------------------------------------------
|
||||
function configure_cloudinit_ssh_keys() {
|
||||
local backtitle="Proxmox VE Helper Scripts"
|
||||
local ssh_key_mode
|
||||
|
||||
# Create temp file for selected keys
|
||||
CLOUDINIT_SSH_KEYS_TEMP="$(mktemp)"
|
||||
: >"$CLOUDINIT_SSH_KEYS_TEMP"
|
||||
|
||||
# Discover keys and build choices
|
||||
IFS=$'\0' read -r -d '' -a _def_files < <(_ci_ssh_discover_files && printf '\0')
|
||||
_ci_ssh_build_choices "${_def_files[@]}"
|
||||
local default_key_count="$CI_SSH_COUNT"
|
||||
|
||||
if [[ "$default_key_count" -gt 0 ]]; then
|
||||
ssh_key_mode=$(whiptail --backtitle "$backtitle" --title "SSH KEY SOURCE" --menu \
|
||||
"Provision SSH keys for Cloud-Init VM:" 14 72 4 \
|
||||
"found" "Select from detected keys (${default_key_count})" \
|
||||
"manual" "Paste a single public key" \
|
||||
"folder" "Scan another folder (path or glob)" \
|
||||
"none" "No SSH keys (password auth only)" 3>&1 1>&2 2>&3) || return 1
|
||||
else
|
||||
ssh_key_mode=$(whiptail --backtitle "$backtitle" --title "SSH KEY SOURCE" --menu \
|
||||
"No host keys detected. Choose:" 12 72 3 \
|
||||
"manual" "Paste a single public key" \
|
||||
"folder" "Scan another folder (path or glob)" \
|
||||
"none" "No SSH keys (password auth only)" 3>&1 1>&2 2>&3) || return 1
|
||||
fi
|
||||
|
||||
case "$ssh_key_mode" in
|
||||
found)
|
||||
# Show checklist with individual keys
|
||||
local selection
|
||||
selection=$(whiptail --backtitle "$backtitle" --title "SELECT SSH KEYS" \
|
||||
--checklist "Select one or more keys to import:" 20 140 10 "${CI_SSH_CHOICES[@]}" 3>&1 1>&2 2>&3) || return 1
|
||||
|
||||
for tag in $selection; do
|
||||
tag="${tag%\"}"
|
||||
tag="${tag#\"}"
|
||||
local line
|
||||
line=$(grep -E "^${tag}\|" "$CI_SSH_MAPFILE" | head -n1 | cut -d'|' -f2-)
|
||||
[[ -n "$line" ]] && printf '%s\n' "$line" >>"$CLOUDINIT_SSH_KEYS_TEMP"
|
||||
done
|
||||
local imported
|
||||
imported=$(wc -l <"$CLOUDINIT_SSH_KEYS_TEMP")
|
||||
echo -e "${ROOTSSH:- 🔑 }${BOLD}${DGN}SSH Keys: ${BGN}${imported} key(s) selected${CL}"
|
||||
;;
|
||||
manual)
|
||||
local pubkey
|
||||
pubkey=$(whiptail --backtitle "$backtitle" --title "PASTE SSH PUBLIC KEY" \
|
||||
--inputbox "Paste your SSH public key (ssh-rsa, ssh-ed25519, etc.):" 10 76 3>&1 1>&2 2>&3) || return 1
|
||||
if [[ -n "$pubkey" ]]; then
|
||||
echo "$pubkey" >"$CLOUDINIT_SSH_KEYS_TEMP"
|
||||
echo -e "${ROOTSSH:- 🔑 }${BOLD}${DGN}SSH Keys: ${BGN}1 key added manually${CL}"
|
||||
else
|
||||
echo -e "${ROOTSSH:- 🔑 }${BOLD}${DGN}SSH Keys: ${BGN}none (empty input)${CL}"
|
||||
CLOUDINIT_SSH_KEYS=""
|
||||
rm -f "$CLOUDINIT_SSH_KEYS_TEMP" "$CI_SSH_MAPFILE" 2>/dev/null
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
folder)
|
||||
local glob_path
|
||||
glob_path=$(whiptail --backtitle "$backtitle" --title "SCAN FOLDER/GLOB" \
|
||||
--inputbox "Enter a folder or glob to scan (e.g. /root/.ssh/*.pub):" 10 72 3>&1 1>&2 2>&3) || return 1
|
||||
if [[ -n "$glob_path" ]]; then
|
||||
shopt -s nullglob
|
||||
local -a _scan_files=($glob_path)
|
||||
shopt -u nullglob
|
||||
if [[ "${#_scan_files[@]}" -gt 0 ]]; then
|
||||
_ci_ssh_build_choices "${_scan_files[@]}"
|
||||
if [[ "$CI_SSH_COUNT" -gt 0 ]]; then
|
||||
local folder_selection
|
||||
folder_selection=$(whiptail --backtitle "$backtitle" --title "SELECT FOLDER KEYS" \
|
||||
--checklist "Select key(s) to import:" 20 140 10 "${CI_SSH_CHOICES[@]}" 3>&1 1>&2 2>&3) || return 1
|
||||
for tag in $folder_selection; do
|
||||
tag="${tag%\"}"
|
||||
tag="${tag#\"}"
|
||||
local line
|
||||
line=$(grep -E "^${tag}\|" "$CI_SSH_MAPFILE" | head -n1 | cut -d'|' -f2-)
|
||||
[[ -n "$line" ]] && printf '%s\n' "$line" >>"$CLOUDINIT_SSH_KEYS_TEMP"
|
||||
done
|
||||
local imported
|
||||
imported=$(wc -l <"$CLOUDINIT_SSH_KEYS_TEMP")
|
||||
echo -e "${ROOTSSH:- 🔑 }${BOLD}${DGN}SSH Keys: ${BGN}${imported} key(s) from folder${CL}"
|
||||
else
|
||||
whiptail --backtitle "$backtitle" --msgbox "No keys found in: $glob_path" 8 60
|
||||
fi
|
||||
else
|
||||
whiptail --backtitle "$backtitle" --msgbox "Path/glob returned no files." 8 60
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
none | *)
|
||||
echo -e "${ROOTSSH:- 🔑 }${BOLD}${DGN}SSH Keys: ${BGN}none (password auth only)${CL}"
|
||||
CLOUDINIT_SSH_KEYS=""
|
||||
rm -f "$CLOUDINIT_SSH_KEYS_TEMP" "$CI_SSH_MAPFILE" 2>/dev/null
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Cleanup mapfile
|
||||
rm -f "$CI_SSH_MAPFILE" 2>/dev/null
|
||||
|
||||
# Set the variable for setup_cloud_init to use
|
||||
if [[ -s "$CLOUDINIT_SSH_KEYS_TEMP" ]]; then
|
||||
CLOUDINIT_SSH_KEYS="$CLOUDINIT_SSH_KEYS_TEMP"
|
||||
else
|
||||
CLOUDINIT_SSH_KEYS=""
|
||||
rm -f "$CLOUDINIT_SSH_KEYS_TEMP"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# SECTION 3: HELPER FUNCTIONS
|
||||
# ==============================================================================
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -144,9 +341,10 @@ function setup_cloud_init() {
|
||||
local cipassword=$(openssl rand -base64 16)
|
||||
qm set "$vmid" --cipassword "$cipassword" >/dev/null
|
||||
|
||||
# Add SSH keys if available
|
||||
if [ -f "$CLOUDINIT_SSH_KEYS" ]; then
|
||||
# Add SSH keys only if explicitly provided (not auto-imported from host)
|
||||
if [ -n "${CLOUDINIT_SSH_KEYS:-}" ] && [ -f "$CLOUDINIT_SSH_KEYS" ]; then
|
||||
qm set "$vmid" --sshkeys "$CLOUDINIT_SSH_KEYS" >/dev/null 2>&1 || true
|
||||
_ci_msg_info "SSH keys imported from: $CLOUDINIT_SSH_KEYS"
|
||||
fi
|
||||
|
||||
# Configure network
|
||||
@@ -459,6 +657,11 @@ export -f wait_for_cloud_init 2>/dev/null || true
|
||||
export -f validate_ip_cidr 2>/dev/null || true
|
||||
export -f validate_ip 2>/dev/null || true
|
||||
|
||||
# Restore previous shell options if they were saved
|
||||
if [ -n "${_OLD_SET_STATE:-}" ]; then
|
||||
eval "$_OLD_SET_STATE"
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# SECTION 7: EXAMPLES & DOCUMENTATION
|
||||
# ==============================================================================
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
____ _ __ ____ __ ___ ____
|
||||
/ _/___ ___ ____ ___ (_)____/ /_ / __ \__ __/ /_ / (_)____ / __ \_________ _ ____ __
|
||||
/ // __ `__ \/ __ `__ \/ / ___/ __ \ / /_/ / / / / __ \/ / / ___/ / /_/ / ___/ __ \| |/_/ / / /
|
||||
_/ // / / / / / / / / / / / /__/ / / / / ____/ /_/ / /_/ / / / /__ / ____/ / / /_/ /> </ /_/ /
|
||||
/___/_/ /_/ /_/_/ /_/ /_/_/\___/_/ /_/ /_/ \__,_/_.___/_/_/\___/ /_/ /_/ \____/_/|_|\__, /
|
||||
/____/
|
||||
Reference in New Issue
Block a user