有老哥用这个编译好的qbittorrent吗,出了点问题
服务器一重启,就连不上qbit面板了:Lhttps://github.com/userdocs/qbittorrent-nox-static 你没运行他怎么访问 我都是能用docker的就用docker 还真是,多谢了。有没有啥重启后自动运行的方法。 我来给您上坟咯 发表于 2022-1-10 19:52
还真是,多谢了。有没有啥重启后自动运行的方法。
写个systemctl就好了 涉及到知识盲区了,先不搞了,多谢啦 安装add-apt-repository命令
sudo apt-get update && sudo apt-get install software-properties-common -y
添加qbittorrent-nox的PPA软件源
# qBittorrent 稳定版
sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
# qBittorrent 测试版
sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-unstable
安装qbittorrent-nox
sudo apt-get update && sudo apt-get install qbittorrent-nox -y
设置开机启动
sudo apt-get install vim -y && vim /etc/systemd/system/qbittorrent-nox.service
Description=qBittorrent-nox
After=network.target
User=root
Type=forking
RemainAfterExit=yes
ExecStart=/usr/bin/qbittorrent-nox -d
WantedBy=multi-user.target
相关命令
修改qbittorrent-nox.service文件后重新载入
sudo systemctl daemon-reload
启动
sudo systemctl start qbittorrent-nox
停止
sudo systemctl stop qbittorrent-nox
设置开机启动
sudo systemctl enable qbittorrent-nox
查看状态
sudo systemctl status qbittorrent-noxhttps://cdn.jsdelivr.net/gh/master-of-forums/master-of-forums/public/images/patch.gif 搞个自启脚本就好了啊 可以写个 systemd 服务自动启动,下面是个例子
cat > /etc/systemd/system/qbit.service << 'EOF'Description=qbittorrentAfter=network.targetType=simpleUser=rootExecStart=/usr/local/bin/qbitExecReload=/bin/kill -HUP $MAINPIDRestart=on-failureWantedBy=multi-user.targetEOFsystemctl daemon-reloadsystemctl enable qbitsystemctl restart qbitsystemctl status qbit 多谢多谢:handshake
页:
[1]