Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
d8b5dd5d10 immichframe: set the admin password the new admin UI requires
immichFrame/ImmichFrame#698 added an admin UI that refuses to open
/admin unless IMMICHFRAME_ADMIN_PASSWORD is set, leaving users to edit
the unit by hand after an install or an upgrade from an older version.

Generate one, put it in the unit next to the other Environment lines,
and record it in ~/immichframe.creds the way the other scripts record
credentials. The update adds the line only when it is missing, so a
password already set by hand survives.
2026-09-17 10:07:43 +02:00
6 changed files with 21 additions and 219 deletions

View File

@@ -543,14 +543,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-09-17
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- poznote: follow init.sh into docker/ [@MickLesk](https://github.com/MickLesk) ([#17316](https://github.com/community-scripts/ProxmoxVE/pull/17316))
## 2026-09-16
### 🚀 Updated Scripts

View File

@@ -79,6 +79,17 @@ function update_script() {
restore_backup
chown -R immichframe:immichframe /opt/immichframe
if ! grep -q '^Environment=IMMICHFRAME_ADMIN_PASSWORD=' /etc/systemd/system/immichframe.service; then
msg_info "Setting Admin Password"
ADMIN_PASSWORD=$(openssl rand -hex 16)
sed -i "/^Environment=DOTNET_CONTENTROOT=/a Environment=IMMICHFRAME_ADMIN_PASSWORD=${ADMIN_PASSWORD}" /etc/systemd/system/immichframe.service
{
echo "ImmichFrame Admin User: admin"
echo "ImmichFrame Admin Password: $ADMIN_PASSWORD"
} >>~/immichframe.creds
systemctl daemon-reload
msg_ok "Set Admin Password (see ~/immichframe.creds)"
fi
msg_info "Starting Service"
systemctl start immichframe

View File

@@ -50,10 +50,8 @@ function update_script() {
restore_backup
msg_info "Running Poznote Initialization"
POZNOTE_INIT=/opt/poznote/docker/init.sh
[[ -f "$POZNOTE_INIT" ]] || POZNOTE_INIT=/opt/poznote/init.sh
chmod +x "$POZNOTE_INIT"
$STD "$POZNOTE_INIT"
chmod +x /opt/poznote/init.sh
$STD /opt/poznote/init.sh
msg_ok "Initialized Poznote Data Directory"
msg_info "Updating Nginx Configuration"

View File

@@ -60,6 +60,11 @@ chown -R immichframe:immichframe /opt/immichframe
msg_ok "Setup ImmichFrame"
msg_info "Creating Service"
ADMIN_PASSWORD=$(openssl rand -hex 16)
{
echo "ImmichFrame Admin User: admin"
echo "ImmichFrame Admin Password: $ADMIN_PASSWORD"
} >>~/immichframe.creds
cat <<EOF >/etc/systemd/system/immichframe.service
[Unit]
Description=ImmichFrame Digital Photo Frame
@@ -74,6 +79,7 @@ ExecStart=/usr/bin/dotnet /opt/immichframe/ImmichFrame.WebApi.dll
Environment=ASPNETCORE_URLS=http://0.0.0.0:8080
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_CONTENTROOT=/opt/immichframe
Environment=IMMICHFRAME_ADMIN_PASSWORD=$ADMIN_PASSWORD
Restart=always
RestartSec=5
StandardOutput=journal

View File

@@ -29,10 +29,8 @@ chown -R www-data:www-data /var/www/html
msg_ok "Deployed Poznote"
msg_info "Running Poznote Initialization"
POZNOTE_INIT=/opt/poznote/docker/init.sh
[[ -f "$POZNOTE_INIT" ]] || POZNOTE_INIT=/opt/poznote/init.sh
chmod +x "$POZNOTE_INIT"
$STD "$POZNOTE_INIT"
chmod +x /opt/poznote/init.sh
$STD /opt/poznote/init.sh
msg_ok "Initialized Poznote Data Directory"
msg_info "Configuring Nginx"

View File

@@ -1,203 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Don Locke (DonLocke) | MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/AllStarLink
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/pve/vm-core.func")
load_functions
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
NEXTID=$(pvesh get /cluster/nextid)
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
METHOD=""
APP="AllStarLink"
APP_TYPE="vm"
NSAPP="allstarlink-vm"
var_os="debian"
var_version="13"
DISK_SIZE="8G"
HA=$(echo "\033[1;34m")
THIN="discard=on,ssd=1,"
header_info
echo -e "\n Loading..."
set -e
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
trap cleanup EXIT
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
var_version="${VM_OS_VERSION:-$var_version}"
elif vm_dialog radiolist "DEBIAN BASE" "Choose the Debian release AllStarLink runs on" --cancel-button Exit-Script 11 60 2 \
"13" "Debian 13 (Trixie)" ON \
"12" "Debian 12 (Bookworm)" OFF; then
var_version="$VM_DIALOG_RESULT"
else
exit_script
fi
case "$var_version" in
13) DEBIAN_CODENAME="trixie" ;;
12) DEBIAN_CODENAME="bookworm" ;;
*)
msg_error "AllStarLink only publishes packages for Debian 12 and 13 (got '${var_version}')"
exit 1
;;
esac
function default_settings() {
vm_apply_machine_type "i440fx"
VMID="$NEXTID"
DISK_CACHE=""
HN="allstarlink"
CPU_TYPE=""
CORE_COUNT="2"
RAM_SIZE="2048"
BRG="vmbr0"
MAC="$GEN_MAC"
VLAN=""
MTU=""
START_VM="yes"
METHOD="default"
vm_echo_default_settings
}
function advanced_settings() {
METHOD="advanced"
vm_prompt_vmid "${VMID:-$(get_valid_nextid)}"
vm_prompt_machine_type "i440fx"
vm_prompt_disk_size "8G"
vm_prompt_disk_cache "none"
vm_prompt_hostname "allstarlink"
vm_prompt_cpu_model "kvm64"
vm_prompt_cpu_cores "2"
vm_prompt_ram "2048"
vm_prompt_bridge "vmbr0"
vm_prompt_mac "$GEN_MAC"
vm_prompt_vlan
vm_prompt_mtu
vm_prompt_verbose "no"
vm_prompt_start_vm "yes"
if vm_confirm_advanced_settings "Ready to create a AllStarLink VM?"; then
echo -e "${CREATING}${BOLD}${DGN}Creating a AllStarLink VM using the above advanced settings${CL}"
else
header_info
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
advanced_settings
fi
}
vm_preflight
vm_start_script "Use Default Settings?" 10 58
post_to_api_vm
vm_select_storage "$HN"
msg_info "Retrieving the URL for the Debian ${var_version} Qcow2 Disk Image"
URL="https://cloud.debian.org/images/cloud/${DEBIAN_CODENAME}/latest/debian-${var_version}-nocloud-$(dpkg --print-architecture).qcow2"
sleep 2
msg_ok "${CL}${BL}${URL}${CL}"
CACHE_FILE="$(vm_image_cache_path "$URL")"
vm_fetch_image "$URL" "$CACHE_FILE" --cache --min-bytes $((100 * 1024 * 1024)) || exit 115
FILE="$(basename "$CACHE_FILE")"
# Work on a copy: the expand and virt-customize steps below rewrite the image,
# which would poison the cache for every later VM.
cp -f "$CACHE_FILE" "$FILE"
# qm resize only grows the block device. Without cloud-init nothing grows the
# guest partition, so expand it offline first.
if [ "${CLOUD_INIT:-no}" != "yes" ]; then
msg_info "Expanding the root filesystem to ${DISK_SIZE}"
vm_expand_image "$FILE" "$DISK_SIZE" || true
fi
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
case $STORAGE_TYPE in
nfs | dir)
DISK_EXT=".qcow2"
DISK_REF="$VMID/"
DISK_IMPORT="-format qcow2"
THIN=""
;;
btrfs)
DISK_EXT=".raw"
DISK_REF="$VMID/"
DISK_IMPORT="-format raw"
FORMAT=",efitype=4m"
THIN=""
;;
esac
for i in {0,1}; do
disk="DISK$i"
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
done
msg_info "Installing Pre-Requisite libguestfs-tools onto Host"
$STD apt-get update
$STD apt-get install -y libguestfs-tools lsb-release
msg_ok "Installed libguestfs-tools successfully"
msg_info "Adding ASL Package Repository"
virt-customize -q -a "${FILE}" \
--run-command "curl -fsSL https://repo.allstarlink.org/public/asl-apt-repos.deb${var_version}_all.deb -o /tmp/asl-apt-repos.deb${var_version}_all.deb" \
--run-command "dpkg -i /tmp/asl-apt-repos.deb${var_version}_all.deb" \
--update \
--run-command "rm -f /tmp/asl-apt-repos.deb${var_version}_all.deb" >/dev/null
msg_ok "Added ASL Package Repository"
msg_info "Installing AllStarLink (patience)"
virt-customize -q -a "${FILE}" \
--install asl3 \
--run-command "sed -i \"/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/\" /etc/asterisk/manager.conf" >/dev/null
msg_ok "Installed AllStarLink"
vm_prepare_cloud_image "$FILE" "$HN" || true
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
ADD_ALLMON3="${VM_ALLMON3:-no}"
elif vm_dialog yesno "SETTINGS" "Would you like to add Allmon3?" 10 58; then
ADD_ALLMON3="yes"
else
ADD_ALLMON3="no"
fi
if [[ "$ADD_ALLMON3" == "yes" ]]; then
msg_info "Installing Allmon3"
virt-customize -q -a "${FILE}" \
--install allmon3 \
--run-command "sed -i \"s/;pass=.*/;pass=\$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/\" /etc/allmon3/allmon3.ini" >/dev/null
msg_ok "Installed Allmon3"
fi
msg_info "Creating a AllStarLink VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags community-script,debian${var_version},radio -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \
-efidisk0 ${DISK0_REF}${FORMAT} \
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \
-boot order=scsi0 \
-serial0 socket >/dev/null
vm_resize_disk
qm set $VMID --agent enabled=1 >/dev/null
set_description
msg_ok "Created a AllStarLink VM ${CL}${BL}(${HN})"
if [ "$START_VM" == "yes" ]; then
msg_info "Starting AllStarLink VM"
$STD qm start $VMID
msg_ok "Started AllStarLink VM"
fi
post_update_to_api "done" "none"
msg_ok "Completed successfully!\n"