Skip to content

Commit 29c9607

Browse files
committed
Process check plugin should accept multiple args
Also, pgrep check should be on full name
1 parent a4ff48c commit 29c9607

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

plugins/is-process-running

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/sh
2-
# Simply checks if the specified process name is currently running.
2+
# Checks if any of the specified processes are currently running.
33
# Mark Blakeney, Jul 2020.
44

5-
[ "$(pgrep -c "$1")" -gt 0 ] && exit 254
5+
for proc in "$@"; do
6+
[ "$(pgrep -c -x "$proc")" -gt 0 ] && exit 254
7+
done
68
exit 0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
setup(
1313
name=name,
14-
version='1.14',
14+
version='1.15',
1515
description='Program to run plugins to inhibit system '
1616
'sleep/suspend/hibernate',
1717
long_description=here.joinpath('README.md').read_text(),

0 commit comments

Comments
 (0)