summaryrefslogtreecommitdiff
path: root/offlineimap-killer.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-27 18:35:51 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-27 18:35:51 -0400
commit49a8f558596d2a287793e12ebac60c026f608df1 (patch)
treeeacd723fbb3e0de0b769458f988fdbd0097fe5e8 /offlineimap-killer.sh
parentd252b0a3eecfdf99c672ebc4cdd552087983f485 (diff)
fix offlineimap-killer
There were decimal points in the output of pid_uptime, causing a syntax error.
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"