Skip to content

Commit

Permalink
Fix wireguard to detect launchd on Monterey
Browse files Browse the repository at this point in the history
  • Loading branch information
palmerc committed Aug 10, 2021
1 parent 52597c3 commit c9adc69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wg-quick/darwin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ parse_options() {
}

detect_launchd() {
unset LAUNCHED_BY_LAUNCHD
LAUNCHED_BY_LAUNCHD=1
local line
while read -r line; do
if [[ $line =~ ^\s*domain\ =\ ]]; then
LAUNCHED_BY_LAUNCHD=1
if [[ $line =~ "^\s*\(pid $$ is not managed by launchd\)" ]]; then
unset LAUNCHED_BY_LAUNCHD
break
fi
done < <(launchctl procinfo $$ 2>/dev/null)
Expand Down

0 comments on commit c9adc69

Please sign in to comment.