From 0c16c00460c9db56869d3c3a65faf48b7b78b51e Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 11 Dec 2020 16:47:18 +0000 Subject: working on getting PID for remind --- remind.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'remind.sh') 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 -- cgit v1.2.3