linux service instructions (#128)

This commit is contained in:
Trevor Arjeski 2024-09-11 15:53:41 +03:00 committed by GitHub
parent dc6966ec1c
commit ef12f43c60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 45 additions and 0 deletions

View File

@ -10,6 +10,9 @@ WIN_SRC = win_service.c
OBJ = $(SRC:.c=.o)
WIN_OBJ = $(WIN_SRC:.c=.o)
PREFIX := /usr/local
INSTALL_DIR := $(DESTDIR)$(PREFIX)/bin/
all: $(TARGET)
$(TARGET): $(OBJ)
@ -23,3 +26,7 @@ windows: $(OBJ) $(WIN_OBJ)
clean:
rm -f $(TARGET) $(TARGET).exe $(OBJ) $(WIN_OBJ)
install: $(TARGET)
mkdir -p $(INSTALL_DIR)
install -m 755 $(TARGET) $(INSTALL_DIR)

24
dist/linux/README.md vendored Normal file
View File

@ -0,0 +1,24 @@
# Installing on Linux
## Building
```sh
cd byedpi/
make
sudo make install
```
## Systemd Service (optional)
Copy and enable the service:
```sh
cp byedpi.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable byedpi.service
systemctl --user start byedpi.service
```
You should see the service now marked as "active":
```sh
systemctl --user status byedpi.service
```

14
dist/linux/byedpi.service vendored Normal file
View File

@ -0,0 +1,14 @@
[Unit]
Description=byedpi
Documentation=https://github.com/hufrea/byedpi
[Service]
ExecStart=ciadpi --split 1 --disorder 3+s --mod-http=h,d --auto=torst --tlsrec 1+s
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
[Install]
WantedBy=default.target