Add socket.sh for monitoring file changes

This commit is contained in:
Kroese 2025-10-08 13:45:05 +02:00 committed by GitHub
parent 626e392642
commit 5058a875a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

12
src/socket.sh Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -Eeuo pipefail
path="/run/shm/msg.html"
inotifywait -m "$path" |
while read -r fp event fn; do
case "${event,,}" in
"modify" ) echo -n "s: " && cat "$path" ;;
"delete_self" ) echo "c: vnc" ;;
esac
done