使用Systemd管理cloudreve

创建 /etc/systemd/system/cloudreve.service

[Unit]
Description=Cloudreve Service
After=network-online.target

[Service]
#默认UMask为0022,使得0777权限被转为0755
UMask=0000
Type=simple
User=cloudreve
Group=cloudreve

# 在启动前创建 socket 父目录
ExecStartPre=/bin/mkdir -p /run/cloudreve
ExecStartPre=/bin/chown cloudreve:cloudreve /run/cloudreve

# Cloudreve 执行文件路径
WorkingDirectory=/home/cloudreve
ExecStart=/home/cloudreve/cloudreve

[Install]
WantedBy=multi-user.target

创建 /etc/tmpfiles.d/cloudreve.conf 为cloudreve在/run下新建文件夹并初始化权限

d /run/cloudreve 0777 cloudreve cloudreve -

可以用 systemd-tmpfiles –create /etc/tmpfiles.d/cloudreve.conf 来生成文件夹

最后在cloudreve的设置文件添加下面的设置项

; 启用 Unix Socket 监听
[UnixSocket]
; Unix Socket 监听路径,默认为空
Listen = /run/cloudreve/cloudreve.sock
; 设置产生的 socket 文件的权限,默认为空
Perm = 0777

“使用Systemd管理cloudreve”的8个回复

  1. PHLRuby Online Casino: Easy Login, Register & Download the Slot App APK for the Best Gaming Experience in the Philippines. Join PHLRuby Online Casino for the best gaming in the Philippines! Fast PHLRuby login, easy register, and PHLRuby download APK for the top slot app. Play today! visit: phlruby

  2. PH987 Official Site: Your Top Destination for PH987 Slot Games. Quick Login, Easy Register, and PH987 App Download for the Best Casino Experience in the Philippines. Experience the ultimate gaming at the PH987 official site! Get quick PH987 login, easy PH987 register, and a seamless PH987 app download for the best PH987 slot games. Join the top-rated casino in the Philippines and start winning today! visit: ph987

回复 play.hit 8.club 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注