From 61882cca828d1584e40f73cfffcf8aa3be4ada1f Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Mon, 14 Oct 2024 10:50:45 +0300 Subject: [PATCH] return 'already started' if already started --- apsalar/icloudsync | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apsalar/icloudsync b/apsalar/icloudsync index 8938836..a5a27fc 100755 --- a/apsalar/icloudsync +++ b/apsalar/icloudsync @@ -36,8 +36,12 @@ start_sync () { } stop_sync () { - tmux send-keys -t $session C-c exit C-m - echo stopped + if check_session 0; then + echo inactive + else + tmux send-keys -t $session C-c exit C-m + echo stopped + fi } status () {