mirror of
https://github.com/hufrea/byedpi.git
synced 2024-12-22 14:25:44 +00:00
linux service instructions (#128)
This commit is contained in:
parent
dc6966ec1c
commit
ef12f43c60
7
Makefile
7
Makefile
@ -10,6 +10,9 @@ WIN_SRC = win_service.c
|
|||||||
OBJ = $(SRC:.c=.o)
|
OBJ = $(SRC:.c=.o)
|
||||||
WIN_OBJ = $(WIN_SRC:.c=.o)
|
WIN_OBJ = $(WIN_SRC:.c=.o)
|
||||||
|
|
||||||
|
PREFIX := /usr/local
|
||||||
|
INSTALL_DIR := $(DESTDIR)$(PREFIX)/bin/
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJ)
|
$(TARGET): $(OBJ)
|
||||||
@ -23,3 +26,7 @@ windows: $(OBJ) $(WIN_OBJ)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TARGET) $(TARGET).exe $(OBJ) $(WIN_OBJ)
|
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
24
dist/linux/README.md
vendored
Normal 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
14
dist/linux/byedpi.service
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user