This repository has been archived by the owner on Dec 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wg-quick: darwin: support being called from launchd
This causes wg-quick up to wait for the monitor to exit before it exits, so that launchd can correctly wait on it. Reported-by: Cameron Palmer <[email protected]>
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
WireGuard for Launchd | ||
===================== | ||
|
||
The example `com.wireguard.wg0.plist` file may be used for running wg-quick(8) | ||
as a launchd service. Note that the `PATH` variable is modified to point to | ||
the PATH used by Homebrew or Macports, so that it uses the non-system bash(1). | ||
|
||
Usage | ||
----- | ||
|
||
$ sudo cp com.wireguard.wg0.plist /Library/LaunchDaemons | ||
$ sudo launchctl load /Library/LaunchDaemons/com.wireguard.wg0.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>Label</key> | ||
<string>com.wireguard.wg0</string> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>/usr/local/bin/wg-quick</string> | ||
<string>up</string> | ||
<string>/usr/local/etc/wireguard/wg0.conf</string> | ||
</array> | ||
<key>OnDemand</key> | ||
<false/> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>TimeOut</key> | ||
<integer>90</integer> | ||
<key>EnvironmentVariables</key> | ||
<dict> | ||
<key>PATH</key> | ||
<string>/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> | ||
</dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters