From 670dd1fc85bb17e981dc4da3852e5447f442ffd5 Mon Sep 17 00:00:00 2001 From: Hane Date: Mon, 1 Jun 2026 17:09:27 +0200 Subject: [PATCH] fix: change doas with (proper) command_user explaination: https://www.redhat.com/en/blog/sudo-rootless-podman --- orchestrating/.config/rc/init.d/podman-containers | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/orchestrating/.config/rc/init.d/podman-containers b/orchestrating/.config/rc/init.d/podman-containers index bb39475..609c5c1 100755 --- a/orchestrating/.config/rc/init.d/podman-containers +++ b/orchestrating/.config/rc/init.d/podman-containers @@ -14,7 +14,9 @@ command="$PODMAN" command_args="start --all --filter restart-policy=always" name="podman-containers" command_background=true +command_user=hane pidfile="/var/run/${RC_SVCNAME}.pid" +#pidfile="/tmp/xdg/$UID-xdg-runtime-dir/${RC_SVCNAME}.pid" output_log="/home/${CONTAINER_USER:-$DEFAULT_CONTAINER_USER}/pihanepi/orchestrating/${RC_SVCNAME}.log" error_log="/home/${CONTAINER_USER:-$DEFAULT_CONTAINER_USER}/pihanepi/orchestrating/${RC_SVCNAME}.err" @@ -25,18 +27,18 @@ error_log="/home/${CONTAINER_USER:-$DEFAULT_CONTAINER_USER}/pihanepi/orchestrati start() { ebegin "Starting Podman containers with restart policy" - doas -u "$CONTAINER_USER" "$PODMAN" start --all --filter restart-policy=$RESTART_POLICY + "$PODMAN" start --all --filter restart-policy=$RESTART_POLICY eend $? } stop() { ebegin "Stopping Podman containers with restart policy" - CONTAINERS=$(doas -u "$CONTAINER_USER" "$PODMAN" container ls --filter restart-policy=$RESTART_POLICY -q) + CONTAINERS=$("$PODMAN" container ls --filter restart-policy=$RESTART_POLICY -q) if [ -n "$CONTAINERS" ]; then for CONTAINER in $CONTAINERS; do - doas -u "$CONTAINER_USER" "$PODMAN" stop "$CONTAINER" + "$PODMAN" stop "$CONTAINER" done eend $? else