docs: run as systemd service
parent
0d2424bd77
commit
b9e7014635
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=wghttp
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=PRIVATE_KEY=FIXME
|
||||
Environment=PEER_KEY=FIXME
|
||||
Environment=PEER_ENDPOINT=FIXME
|
||||
Environment=CLIENT_IP=FIXME
|
||||
ExecStart=%h/go/bin/wghttp --listen 127.0.0.1:1080
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Usage
|
||||
|
||||
## Running as systemd service
|
||||
|
||||
Since wghttp doesn't need any privilege, it's preferred to run as systemd user service.
|
||||
|
||||
Copy [wghttp.service](./systemd/wghttp.service) to `~/.config/systemd/user/wghttp.service`.
|
||||
After setting the environment options in `wghttp.service`, run:
|
||||
|
||||
```bash
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now wghttp
|
||||
```
|
||||
Loading…
Reference in New Issue