summaryrefslogtreecommitdiff
path: root/offlineimap-killer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'offlineimap-killer.sh')
-rw-r--r--offlineimap-killer.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/offlineimap-killer.sh b/offlineimap-killer.sh
index 91f9509..7b88b2f 100644
--- a/offlineimap-killer.sh
+++ b/offlineimap-killer.sh
@@ -20,7 +20,7 @@ main() {
local pids=($(pgrep -x offlineimap))
local pid
for pid in "${pids[@]}"; do
- declare -i uptime=$(pid_uptime $pid)
+ declare -i uptime=$(pid_uptime $pid|cut -d. -f1)
if [[ "$uptime" -gt "$pid" ]]; then
printf 'Killing %d which has been running for %d seconds' "$pid" "$uptime"
kill -9 "$pid"