|
发表于 2023-7-29 16:07:12
|
显示全部楼层
可以写个 systemd 服务自动启动,下面是个例子- cat > /etc/systemd/system/qbit.service << 'EOF'[Unit]Description=qbittorrentAfter=network.target[Service]Type=simpleUser=rootExecStart=/usr/local/bin/qbitExecReload=/bin/kill -HUP $MAINPIDRestart=on-failure[Install]WantedBy=multi-user.targetEOFsystemctl daemon-reloadsystemctl enable qbitsystemctl restart qbitsystemctl status qbit
复制代码 |
|