aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-12-11 16:47:18 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-12-11 16:47:18 +0000
commit0c16c00460c9db56869d3c3a65faf48b7b78b51e (patch)
treed3712208f29ff4ce28c3f8d88c61e73db442e5e3
parent325e68fdecee71fbb7916b4a11b02c3d4e689194 (diff)
working on getting PID for remind
-rwxr-xr-xremind.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/remind.sh b/remind.sh
index 986a9bb..1055e7a 100755
--- a/remind.sh
+++ b/remind.sh
@@ -85,10 +85,9 @@ COMMAND="REM $day ${MONTHS[$month]} $year AT $TIME +15 *5 MSG $DESCRIPTION %1"
# main
# first test if pid
-pid_cmd="pgrep $remind"
-[[ -z $(ssh $TW_HOOK_REMIND_REMOTE_HOST "pgrep $remind > /dev/null 2>&1") ]] && echo "Failed to get remind PID" && exit 1
+[[ -z $(ssh $TW_HOOK_REMIND_REMOTE_HOST "$pid_cmd" > /dev/null 2>&1") ]] && echo "Failed to get remind PID" && exit 1
-echo $pid
+echo "remind PID is $pid"
ssh $TW_HOOK_REMIND_REMOTE_HOST "
echo "$COMMAND" >> ~/.reminders/${TARGETFILE}.rem