mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-28 16:14:07 +02:00
Add useful comment
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net> Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
parent
888556278e
commit
d177c4c776
@ -235,7 +235,9 @@ is_pid1() {
|
|||||||
# Checks to see if the given command runs as PID 1
|
# Checks to see if the given command runs as PID 1
|
||||||
local is_pid1="$1"
|
local is_pid1="$1"
|
||||||
|
|
||||||
ps -p 1 -o comm= | grep -q "${is_pid1}"
|
# select PID 1, format output to show only CMD column without header
|
||||||
|
# quietly grep for a match on the function passed parameter
|
||||||
|
ps --pid 1 --format comm= | grep -q "${is_pid1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compatibility
|
# Compatibility
|
||||||
|
Loading…
x
Reference in New Issue
Block a user