diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-27 18:35:51 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-27 18:35:51 -0400 |
commit | 49a8f558596d2a287793e12ebac60c026f608df1 (patch) | |
tree | eacd723fbb3e0de0b769458f988fdbd0097fe5e8 | |
parent | d252b0a3eecfdf99c672ebc4cdd552087983f485 (diff) |
fix offlineimap-killer
There were decimal points in the output of pid_uptime, causing a syntax
error.
-rw-r--r-- | offlineimap-killer.sh | 2 |
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" |