mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2026-03-03 23:37:23 +08:00
Add socket.sh for monitoring file changes
This commit is contained in:
parent
626e392642
commit
5058a875a0
12
src/socket.sh
Normal file
12
src/socket.sh
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user