bash-com/trigger

15 lines
316 B
Bash
Executable File

#!/bin/bash
# (0) Get current ABS directory
ROOT=$(dirname `realpath $0`);
# (1) Check arguments
test $# -lt 1 && echo "ERR: Missing arguments (trigger_port)" && exit 1;
# (2) Wait for triggering by peer
echo "(.) set up [trigger:$1]";
nc -lp $1;
# (3) Log trigger received #
echo " > RECEIVED [trigger:$1]";