跳至正文
  • 11 views
  • 1 min read

wackup脚本(自编)

新浪微博 豆瓣 QQ 百度贴吧 QQ空间

#!/bin/sh

shname=${0##*/}

if [[ $# != 1 ]]
then
  act=null
else
  act=$1
fi

if [[ $act == a ]]
then
  /usr/bin/etherwake -D -i "br-lan" "00:E0:7C:68:15:05"
  /usr/bin/etherwake -D -i "br-lan" "00:E0:70:21:2D:38"
elif [[ $act == j ]]
then
  /usr/bin/etherwake -D -i "br-lan" "00:E0:70:21:2D:38"
elif [[ $act == i ]]
then
  /usr/bin/etherwake -D -i "br-lan" "00:E0:7C:68:15:05"
else
  echo "[ERROR]:Invalid action."
  echo ""
  echo "USAGE:"
  echo "-----"
  echo "$shname [ a|i|j ]"
  echo ""
fi

发表回复