Simple Torrent:一个支持边下边播、无版权限制和自动上传的BT离线下载程序

本文介绍了如何使用Go语言编译运行Simple Torrent,这是一个支持边下边播、无版权限制和自动上传的BT离线下载程序。通过拉取代码、下载依赖、编译并设置systemd启动命令,实现服务自动化运行。同时,配置文件允许自定义下载目录、种子发布及任务管理,如下载完成后通过脚本自动移动文件并清理任务。
摘要由CSDN通过智能技术生成

1:拉取代码,下载依赖,编译

git clone https://github.com/boypt/cloud-torrent.git  #拉取代码
cd cloud-torrent
go get -v ./...   #下载依赖
CGO_ENABLED=0 #不知道啥意思

go build -o cloud-torrent -ldflags "-s -w -X main.VERSION=1.0.0" #编译

mv cloud-torrent /usr/local/bin

2: 编写systemctl启动命令

cd /usr/lib/systemd/system

vim clound-torrent.service

编辑写入一下内容到cloud-torrent.service

[Unit]
Description=simple-torrent

[Service] 
Type=simple
#User=root
#WorkingDirectory=~
#Environment=AUTH=user:ctorrent
Environment=LISTEN=:3000
ExecStart=/usr/local/bin/cloud-torrent -c ./cloud-torrent.yaml --disable-log-time
PrivateTmp=true
Restart=always
RestartPreventExitStatus=42
Res

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值