cloudreve私有云盘配置后台运行

在/usr/lib/systemd/system目录下创建一个服务cloudreve.service

sudo vim /etc/systemd/system/cloudreve.service

输入如下内容:

[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org

[Service]
TimeoutStartSec=0
ExecStart=/data/cloudreve/cloudreve
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

更新重启服务

# 更新配置
systemctl daemon-reload

# 启动服务
systemctl start cloudreve

# 设置开机启动
systemctl enable cloudreve

管理命令

# 启动服务
systemctl start cloudreve

# 停止服务
systemctl stop cloudreve

# 重启服务
systemctl restart cloudreve

# 查看状态
systemctl status cloudreve

参考资料

  1. cloudreve私有云盘配置后台运行:https://blog.csdn.net/longzhoufeng/article/details/108958091
Last modification:December 7th, 2021 at 06:11 pm
如果觉得我的文章对你有用,请随意赞赏