Skip to content

Commit bd8bf26

Browse files
authored
Merge pull request #98 from nirs/readme-binary-launchd
Add instructions for installing launchd service
2 parents b02a310 + 951af45 commit bd8bf26

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)