Initial commit

This commit is contained in:
linus committed 2026-10-20 18:07:50 +02:00
commit 07e96e4d4a
1 file changed
+37
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
statedir="/tmp/keepassxc"
mkdir -p "$statedir"
pidfile="$statedir/pid"
keepass_running()
{
test -e "$pidfile" && {
KPID="$(<$pidfile)"
if ps -q "$KPID" >/dev/null 2>&1; then
zenity --info --text "Keepass läuft schon unter pid $KPID"
return 0
fi
rm "$pidfile"
}
return 1
}
start_keepass()
{
if ! keepass_running; then
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