This commit is contained in:
linus committed 2026-10-20 18:34:12 +02:00
1 parent 07e96e4d4a
commit 21911e0647
1 file changed
+14 -5
+14 -5
View File
@@ -4,6 +4,7 @@ statedir="/tmp/keepassxc"
mkdir -p "$statedir"
pidfile="$statedir/pid"
fifo="$statedir/fifo"
keepass_running()
{
@@ -25,13 +26,21 @@ start_keepass()
flatpak run org.keepassxc.KeePassXC --pw-stdin "$@" \
~/Nextcloud/data/Gemeinsam/keepass/LinusKeyPass.kdbx \
< ~/.local/share/keepass &> /dev/null &
STAT=$?
echo "$!" > "$pidfile"
return $STAT
fi
return 0
}
start_keepass
test -e "$fifo" || mkfifo "$fifo"
while true; do
read l < "$fifo"
case "$l" in
start-keepass)
start_keepass
;;
done)
exit 0
;;
esac
done