new script: sane-shutdown, validates host
This commit is contained in:
parent
83f416999f
commit
81effb01a3
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
target="$1"
|
||||
host="$(hostname)"
|
||||
if [ "$host" = "$target" ]
|
||||
then
|
||||
sudo shutdown now
|
||||
else
|
||||
echo "WRONG MACHINE. you're on $host."
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue