added shutdown delay selector

This commit is contained in:
2025-10-11 05:52:22 -06:00
parent 5785328dca
commit f9beed3091
2 changed files with 24 additions and 5 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
if [[ ! -z $1 ]]; then
message="$1"
else
message="Something happening! Maybe a shutdown!"
fi
for pts in $(ls -q /dev/pts); do
if [[ "$pts" =~ ^[0-9]+$ ]] && [[ "/dev/pts/$pts" != "$(tty)" ]]; then
sudo echo -e "$message" > /dev/pts/$pts
fi
done