Mit Browser

This commit is contained in:
linus committed 2026-10-20 20:16:04 +02:00
1 parent c1d8711066
commit 5ab26951d2
1 file changed
+17 -4
+17 -4
View File
@@ -5,13 +5,16 @@ mkdir -p "$statedir"
pidfile="$statedir/pid"
fifo="$statedir/fifo"
errfile="$statedir/error.log"
exec 2> "$errfile"
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"
# zenity --info --text "Keepass läuft schon unter pid $KPID"
return 0
fi
rm "$pidfile"
@@ -27,20 +30,30 @@ start_keepass()
~/Nextcloud/data/Gemeinsam/keepass/LinusKeyPass.kdbx \
< ~/.local/share/keepass &> /dev/null &
echo "$!" > "$pidfile"
return 0
fi
return 1
}
test -e "$fifo" || mkfifo "$fifo"
while true; do
read l < "$fifo"
case "$l" in
set -- $l
case "$1" in
start-keepass)
start_keepass
shift
start_keepass "$@"
;;
start-browser)
shift
start_keepass --minimized
/usr/bin/brave-browser-stable "$@"
;;
done)
rm "$fifo"
exit 0
;;
esac
done