mirror of
https://github.com/daeuniverse/dae.git
synced 2025-02-06 01:02:52 +07:00
doc: add run-as-daemon.md (#25)
This commit is contained in:
parent
f412f9eeac
commit
7bd18a343d
@ -36,16 +36,24 @@ make GOFLAGS="-buildvcs=false" CC=clang
|
||||
|
||||
### Run
|
||||
|
||||
**Config Dir**
|
||||
|
||||
```shell
|
||||
mkdir -p /etc/dae
|
||||
curl -L -o /etc/dae/config.dae https://github.com/v2rayA/dae/raw/main/example.dae
|
||||
```
|
||||
|
||||
**Runtime Dependencies**
|
||||
|
||||
Download [geoip.dat](https://github.com/v2ray/geoip/releases/latest) and [geosite.dat](https://github.com/v2fly/domain-list-community/releases/latest) to `/usr/local/share/dae/`.
|
||||
For traffic splitting, Dae relies on the following data sources, [geoip.dat](https://github.com/v2ray/geoip/releases/latest) and [geosite.dat](https://github.com/v2fly/domain-list-community/releases/latest).
|
||||
|
||||
```
|
||||
```shell
|
||||
mkdir -p /usr/local/share/dae/
|
||||
pushd /usr/local/share/dae/
|
||||
curl -L -o geoip.dat https://github.com/v2ray/geoip/releases/latest/download/geoip.dat
|
||||
curl -L -o geosite.dat https://github.com/v2ray/domain-list-community/releases/latest/download/dlc.dat
|
||||
popd
|
||||
|
||||
```
|
||||
|
||||
**Run**
|
||||
@ -54,4 +62,6 @@ popd
|
||||
./dae run -c example.dae
|
||||
```
|
||||
|
||||
Alternatively, you may run Dae as a daemon(systemd) service. Check out more details [HERE](./run-as-daemon.md).
|
||||
|
||||
See [example.dae](https://github.com/v2rayA/dae/blob/main/example.dae).
|
||||
|
38
docs/getting-started/run-as-daemon.md
Normal file
38
docs/getting-started/run-as-daemon.md
Normal file
@ -0,0 +1,38 @@
|
||||
# Run Dae as a Daemon Service
|
||||
|
||||
[systemd](https://wiki.debian.org/systemd) allows you to create and manage services in extremely powerful and flexible ways.
|
||||
|
||||
> **Note**
|
||||
> If your distribution's service manager is provided by systemd.
|
||||
|
||||
Dae can be running as a daemon(systemd) service so that it can run at boot.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
> **Note**
|
||||
> The config file is recommended to save under `/etc/dae`
|
||||
|
||||
Download the sample config file
|
||||
|
||||
```bash
|
||||
mkdir -p /etc/dae
|
||||
curl -L -o /etc/dae/config.dae https://github.com/v2rayA/dae/raw/main/example.dae
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
# download the sample systemd.service
|
||||
sudo curl -L -o /etc/systemd/system/dae.service https://github.com/v2rayA/dae/raw/main/install/dae.service
|
||||
|
||||
# reload and restart daemon to take effect
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable dae --now
|
||||
sudo systemctl status dae
|
||||
```
|
||||
|
||||
## Check System Logs
|
||||
|
||||
```bash
|
||||
sudo journalctl -xefu dae
|
||||
```
|
Loading…
Reference in New Issue
Block a user