mirror of
https://codeberg.org/YGGverse/ytd.git
synced 2026-04-08 12:55:32 +00:00
add systemd example, minor corrections
This commit is contained in:
parent
9b0f438932
commit
e9a3eda164
1 changed files with 44 additions and 3 deletions
45
README.md
45
README.md
|
|
@ -1,8 +1,8 @@
|
||||||
# ytd
|
# ytd
|
||||||
|
|
||||||
YouTube daemon for crawling and processing channels with pre-configured commands
|
YouTube daemon and CLI tool for crawling and processing channels with pre-configured commands vector.
|
||||||
|
|
||||||
* this tool initially created as a tool for the [Pidpilne](https://codeberg.org/YGGverse/pidpilne) project.
|
_This tool initially created as a tool for the [Pidpilne](https://codeberg.org/YGGverse/pidpilne) project._
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|
@ -23,3 +23,44 @@ Background / daemon:
|
||||||
``` bash
|
``` bash
|
||||||
RUST_LOG=ytd=warn NO_COLOR=1 /usr/local/bin/ytd -c /etc/config.toml
|
RUST_LOG=ytd=warn NO_COLOR=1 /usr/local/bin/ytd -c /etc/config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### systemd
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
git clone https://codeberg.org/yggverse/ytd.git
|
||||||
|
cd ytd
|
||||||
|
cargo build --release --locked
|
||||||
|
sudo install target/release/ytd /usr/local/bin
|
||||||
|
sudo cp example/config.toml /etc/ytd.toml
|
||||||
|
sudo useradd -s /usr/sbin/nologin -Mr ytd
|
||||||
|
sudo mkdir /var/lib/ytd && sudo chown ytd:ytd /var/lib/ytd
|
||||||
|
sudo mkdir /var/log/ytd && sudo chown ytd:ytd /var/log/ytd
|
||||||
|
```
|
||||||
|
|
||||||
|
``` /etc/systemd/system/ytd.service
|
||||||
|
#/etc/systemd/system/ytd.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=ytd
|
||||||
|
Group=ytd
|
||||||
|
|
||||||
|
Environment="RUST_LOG=ytd=warn"
|
||||||
|
Environment="NO_COLOR=1"
|
||||||
|
WorkingDirectory=/var/lib/ytd
|
||||||
|
ExecStart=/usr/local/bin/ytd -c=/etc/ytd.toml
|
||||||
|
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
StandardOutput=file:///var/log/ytd/debug.log
|
||||||
|
StandardError=file:///var/log/ytd/error.log
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
* `sudo systemctl restart ytd`
|
||||||
|
* `sudo systemctl enable ytd`
|
||||||
|
* `sudo systemctl status ytd`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue