This repository has been archived on 2023-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
2023-01-20 21:42:36 -07:00
|
|
|
# Example systemd Service
|
|
|
|
|
2023-01-22 12:29:44 -07:00
|
|
|
`/etc/systemd/system/youtube-dl.service`
|
2023-01-20 21:42:36 -07:00
|
|
|
|
|
|
|
```systemd
|
|
|
|
[Unit]
|
|
|
|
Description=Youtube-DL Daemon
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
2023-01-22 12:29:44 -07:00
|
|
|
ExecStart=/usr/bin/python3 /home/user/automated-youtube-dl/downloader.py --daemon --silence-errors --sleep 60 "https://www.youtube.com/playlist?list=example12345" "/mnt/nfs/archive/YouTube/Example Playlist/"
|
2023-01-20 21:42:36 -07:00
|
|
|
User=user
|
|
|
|
Group=user
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
```
|
|
|
|
|
2023-01-22 12:38:26 -07:00
|
|
|
Now start the service:
|
2023-01-20 21:42:36 -07:00
|
|
|
```bash
|
|
|
|
sudo systemctl daemon-reload
|
2023-01-22 12:29:44 -07:00
|
|
|
sudo systemctl enable --now youtube-dl
|
2023-01-20 21:42:36 -07:00
|
|
|
```
|
2023-01-22 12:38:26 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can watch the process with:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo journalctl -b -u youtube-dl.service
|
|
|
|
```
|
|
|
|
|