Initial commit
This commit is contained in:
commit
0a36fb9729
15 changed files with 88 additions and 0 deletions
27
siahsd_handler.sh
Executable file
27
siahsd_handler.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
|
||||
HOOKS_DIR=`dirname "$0"`
|
||||
|
||||
PROM="$1"
|
||||
CODE="$2"
|
||||
DESCR="$3"
|
||||
SIA_CODE_STR="$4"
|
||||
SIA_CODE_DESCR="$5"
|
||||
|
||||
# Ignore communication tests.
|
||||
if [[ ! "$CODE" =~ "RP" ]]; then
|
||||
irc-say "Alarm event: $CODE -- $SIA_CODE_STR: $SIA_CODE_DESCR"
|
||||
fi
|
||||
|
||||
case "$CODE" in
|
||||
C[LAFJKQS]*):
|
||||
run-parts "$HOOKS_DIR/armed.d" --verbose "--arg=$1" "--arg=$2" "--arg=$3" "--arg=$4" "--arg=$5"
|
||||
;;
|
||||
|
||||
O[AJKPQS]*):
|
||||
run-parts "$HOOKS_DIR/disarmed.d" --verbose "--arg=$1" "--arg=$2" "--arg=$3" "--arg=$4" "--arg=$5"
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue