Skip to content

Commit 951af45

Browse files
committed
Add instructions for installing launchd service
When installing from binary, we cannot use make install.lauchd. Add details section with instructions that can be copied and pasted from the readme. Signed-off-by: Nir Soffer <nirsof@gmail.com>
1 parent b02a310 commit 951af45

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,47 @@ sudo tar Cxzvf / "${FILE}" opt/socket_vmnet
6161

6262
This downloads and installs the latest release from <https://github.com/lima-vm/socket_vmnet/releases>.
6363

64+
<details>
65+
66+
<summary>Launchd (optional, not needed for Lima)</summary>
67+
68+
<p>
69+
70+
To install the launchd service:
71+
72+
```bash
73+
SERVICE_ID=io.github.lima-vm.socket_vmnet
74+
sudo cp "/opt/socket_vmnet/share/doc/socket_vmnet/launchd/$SERVICE_ID.plist" "/Library/LaunchDaemons/$SERVICE_ID.plist"
75+
sudo launchctl bootstrap system "/Library/LaunchDaemons/$SERVICE_ID.plist"
76+
sudo launchctl enable system/$SERVICE_ID
77+
sudo launchctl kickstart -kp system/$SERVICE_ID
78+
```
79+
80+
The launchd unit file will be installed as `/Library/LaunchDaemons/io.github.lima-vm.socket_vmnet.plist`.
81+
82+
Default configuration:
83+
84+
| Config | Value |
85+
| ------- | ------------------------------ |
86+
| Socket | `/var/run/socket_vmnet` |
87+
| Stdout | `/var/log/socket_vmnet/stdout` |
88+
| Stderr | `/var/log/socket_vmnet/stderr` |
89+
| Gateway | 192.168.105.1 |
90+
91+
To uninstall the launchd service:
92+
93+
```bash
94+
SERVICE_ID=io.github.lima-vm.socket_vmnet
95+
sudo launchctl bootout system "/Library/LaunchDaemons/$SERVICE_ID.plist" || true
96+
sudo rm -f "/Library/LaunchDaemons/$SERVICE_ID.plist"
97+
```
98+
99+
</p>
100+
101+
</details>
102+
64103
### From source
104+
65105
```bash
66106
sudo make install.bin
67107
```

0 commit comments

Comments
 (0)