创建服务文件:
/usr/lib/systemd/system/cloud-torrent.service
Ubuntu18使用的是这个目录:
/lib/systemd/system/
写入内容:
[Unit] Description=cloud-torrent [Service] WorkingDirectory=/root/ ExecStart=/usr/local/bin/cloud-torrent --port 8080 --config-path /root/cloud-torrent.json --title "Cloud Torrent" --log --auth "user:password" Restart=always RestartSec=3 [Install] WantedBy=multi-user.target
开机启动
systemctl enable cloud-torrent
启动服务
systemctl start cloud-torrent
查看运行状态
systemctl status cloud-torrent
0 条评论