- [Unit]
- Description=Cloudreve Service
- After=network.target
-
- [Service]
- Type=simple
- User=root
- WorkingDirectory=/www/wwwroot/cloudreve
- ExecStart=/www/wwwroot/cloudreve/cloudreve
- Restart=on-failure
-
- [Install]
- WantedBy=multi-user.target
复制代码 sudo nano /etc/systemd/system/cloudreve.service
在服务文件中添加以人上内容: 根据你的设置调整路径和参数,然后将以下配置粘贴到文件中: 保存并关闭文件:
按 Ctrl+X 退出,然后按 Y 确认保存,最后按 Enter 确认文件名。
重新加载Systemd守护进程:
sudo systemctl daemon-reload
启用Cloudreve服务以在启动时自动运行:
sudo systemctl enable cloudreve
启动Cloudreve服务:
sudo systemctl start cloudreve
检查Cloudreve服务状态:
sudo systemctl status cloudreve
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/jxyk2007/article/details/140179147
|