mirror of
https://github.com/hufrea/byedpi.git
synced 2024-12-22 14:25:44 +00:00
Add start instruction as daemon (#243)
This commit is contained in:
parent
467391bbd1
commit
b11962ff9c
@ -16,6 +16,13 @@ ciadpi --fake -1 --ttl 8
|
|||||||
-p, --port <num>
|
-p, --port <num>
|
||||||
Прослушиваемый порт, по умолчанию 1080
|
Прослушиваемый порт, по умолчанию 1080
|
||||||
|
|
||||||
|
-D, --daemon
|
||||||
|
Запуск в режиме демона
|
||||||
|
Поддерживается только в Linux и BSD системах
|
||||||
|
|
||||||
|
-w, --pidfile <filename>
|
||||||
|
Расположение PID-файла
|
||||||
|
|
||||||
-E, --transparent
|
-E, --transparent
|
||||||
Запуск в режиме прозрачного прокси, SOCKS работать не будет
|
Запуск в режиме прозрачного прокси, SOCKS работать не будет
|
||||||
|
|
||||||
|
26
dist/bsd/README.md
vendored
Normal file
26
dist/bsd/README.md
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Installing on BSD
|
||||||
|
|
||||||
|
Tested on FreeBSD 14.1 and DrafonFly BSD 6.4
|
||||||
|
|
||||||
|
## Building
|
||||||
|
```sh
|
||||||
|
cd byedpi/
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
## System Service
|
||||||
|
|
||||||
|
You can configure the program to run as system service.
|
||||||
|
|
||||||
|
### As system service:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo cp byedpi /usr/local/etc/init.d
|
||||||
|
sudo sysrc byedpi_enable="YES"
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see the service now marked as "active":
|
||||||
|
```sh
|
||||||
|
sudo service byedpi status
|
||||||
|
```
|
28
dist/bsd/byedpi
vendored
Executable file
28
dist/bsd/byedpi
vendored
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# PROVIDE: byedpi
|
||||||
|
# REQUIRE: DAEMON
|
||||||
|
# BEFORE: LOGIN
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
|
# Define these byedpi_* variables in one of these files:
|
||||||
|
# /etc/rc.conf
|
||||||
|
# /etc/rc.conf.local
|
||||||
|
# /etc/rc.conf.d/byedpi
|
||||||
|
#
|
||||||
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
||||||
|
|
||||||
|
byedpi_enable=${byedpi_enable-"NO"}
|
||||||
|
byedpi_flags=${byedpi_flags-"--daemon --pidfile /var/run/ciadpi.pid -split 1 --disorder 3+s --mod-http=h,d --auto=torst --tlsrec 1+s"}
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name="byedpi"
|
||||||
|
rcvar=byedpi_enable
|
||||||
|
command="/usr/local/bin/ciadpi"
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
|
||||||
|
start_cmd="echo \"Starting ${name}.\"; ${command} ${byedpi_flags}"
|
||||||
|
|
||||||
|
run_rc_command "$1"
|
Loading…
Reference in New Issue
Block a user