Advertisement
xangin

new Earthquake shell script

Apr 24th, 2024 (edited)
1,197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/bash
  2. #將全部內容複製後,另存為ea.sh,之後在地牛wake up中選擇此檔案執行,
  3. #需要先安裝curl指令:sudo apt install curl
  4. #修改成自己HA的IP:PORT,注意等號左右不能有空格唷!!
  5. DST=http://192.168.xxx.xxx:8123
  6.  
  7. curl -X POST \
  8.   -H "Content-Type: application/json" \
  9.   -d "{ \"level\": \"$1\" , \"seconds\": \"$2\" }" \
  10.   $DST/api/webhook/trigger_ea_command
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement