aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-12-11 16:48:19 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-12-11 16:48:28 +0000
commita76bf14d21e3bd583324d26ea5ca7e3360151707 (patch)
tree948c9510187e929333ff031fdeecb782165fc754
parent0c16c00460c9db56869d3c3a65faf48b7b78b51e (diff)
working on getting PID for remind
-rwxr-xr-xremind.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/remind.sh b/remind.sh
index 1055e7a..526af5c 100755
--- a/remind.sh
+++ b/remind.sh
@@ -84,10 +84,8 @@ fi
COMMAND="REM $day ${MONTHS[$month]} $year AT $TIME +15 *5 MSG $DESCRIPTION %1"
# main
-# first test if pid
-[[ -z $(ssh $TW_HOOK_REMIND_REMOTE_HOST "$pid_cmd" > /dev/null 2>&1") ]] && echo "Failed to get remind PID" && exit 1
-
-echo "remind PID is $pid"
+# first test if pid - if not exit (SCRIPT OBVIOUSLY WILL NOT PROCEED FOR TEST SERVER)
+[[ -z $(ssh $TW_HOOK_REMIND_REMOTE_HOST "$pid_cmd > /dev/null 2>&1") ]] && echo "Failed to get remind PID" && exit 1
ssh $TW_HOOK_REMIND_REMOTE_HOST "
echo "$COMMAND" >> ~/.reminders/${TARGETFILE}.rem