Commands:
- Restart Systemd Daemon:
systemctl daemon-reload - Enable Service:
systemctl enable qbittorrent
- Linx Man:
man systemd.service - systemd 编写服务管理脚本
- 编写systemd服务脚本
| [Unit] | |
| Description=qBittorrent Downloader | |
| After=network-online.service | |
| [Service] | |
| Type=simple | |
| User=xxxx | |
| ExecStart=/usr/bin/qbittorrent-nox | |
| [Install] | |
| WantedBy=multi-user.target |
Commands:
systemctl daemon-reloadsystemctl enable qbittorrentman systemd.service| [Unit] | |
| Description=Enable Wake-up on LAN | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/sbin/ethtool -s eno1 wol g | |
| [Install] | |
| WantedBy=basic.target |