mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 2b8d12ca5754fb34b4caf92025112e74aad10cd2
parent 8e163d1822ea8eb64eb09222472afadd8971f192
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 17 Dec 2016 13:51:02 +0100

handle missing machines

Diffstat:
wake | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/wake b/wake @@ -8,5 +8,10 @@ DB="$HOME/config/private/wakeonlan" PROXY=$(grep "^$1" "$DB" | cut -d ' ' -f2) MAC=$(grep "^$1" "$DB" | cut -d ' ' -f3) -ssh "$PROXY" wakeonlan "$MAC" +if [ -z "$PROXY" ] +then + echo "unknown machine $MACHINE" +else + ssh "$PROXY" wakeonlan "$MAC" +fi