Compare commits

...
Author SHA1 Message Date
MickLesk 2a153575f2 Authentik, DietPi, Orb: use the engine's host-side helpers instead of pct
After build_container these scripts called pct directly, which an Incus
host does not have. They now use ct_attach_volume, ct_exec, ct_restart
and ct_exec_hint. Needs core feat/ct-host-helpers.
2026-11-22 23:05:01 +01:00
3 changed files with 5 additions and 21 deletions

No files matched your search

+3 -15
View File
@@ -213,20 +213,8 @@ start
build_container
msg_info "Attaching data storage volume"
$STD pct stop "$CTID"
if [ "${PROTECT_CT:-}" == "1" ] || [ "${PROTECT_CT:-}" == "yes" ]; then
$STD pct set "$CTID" --protection 0
$STD pct set "$CTID" -mp0 "${CONTAINER_STORAGE}":1,mp=/opt/authentik-data,backup=1
$STD pct set "$CTID" --protection 1
else
$STD pct set "$CTID" -mp0 "${CONTAINER_STORAGE}":1,mp=/opt/authentik-data,backup=1
fi
$STD pct start "$CTID"
for i in {1..10}; do
pct status "$CTID" | grep -q "status: running" && break
sleep 1
done
$STD pct exec "$CTID" -- bash -c "mkdir -p /opt/authentik-data/{certs,media,geoip,templates}; \
ct_attach_volume 1 /opt/authentik-data
$STD ct_exec bash -c "mkdir -p /opt/authentik-data/{certs,media,geoip,templates}; \
cp /opt/authentik/tests/geoip/GeoLite2-ASN-Test.mmdb /opt/authentik-data/geoip/GeoLite2-ASN.mmdb; \
cp /opt/authentik/tests/geoip/GeoLite2-City-Test.mmdb /opt/authentik-data/geoip/GeoLite2-City.mmdb; \
cp -r /opt/authentik/blueprints /opt/authentik-data/; \
@@ -235,7 +223,7 @@ $STD pct exec "$CTID" -- bash -c "mkdir -p /opt/authentik-data/{certs,media,geoi
msg_ok "Attached data storage volume"
msg_info "Starting Services"
pct exec "$CTID" -- systemctl enable -q --now authentik-server authentik-worker
ct_exec systemctl enable -q --now authentik-server authentik-worker
msg_ok "Started Services"
description
+1 -5
View File
@@ -44,11 +44,7 @@ build_container
description
msg_info "Restarting ${APP} for DietPi's first boot"
if command -v pct &>/dev/null; then
pct reboot "$CTID"
else
incus restart "$CTID"
fi
ct_restart
msg_ok "Restarted ${APP}"
msg_ok "Completed successfully!"
+1 -1
View File
@@ -45,4 +45,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${TAB}${GATEWAY}${BGN}To link the sensor to your orb account run:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}pct exec ${CTID} -- runuser -u orb -- orb link${CL}"
echo -e "${TAB}${GATEWAY}${BGN}$(ct_exec_hint runuser -u orb -- orb link)${CL}"