当我配置同步自动启动时,请遵循以下docs:
[dolphin@MiWiFi-R4CM-srv system]$ cat /usr/lib/systemd/system/syncthing@dolphin.service
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target
[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
并使用此命令启动:
systemctl start syncthing@dolphin.service
但是当我检查状态时:
[dolphin@MiWiFi-R4CM-srv system]$ systemctl status syncthing@dolphin.service
● syncthing@dolphin.service - Syncthing - Open Source Continuous File Synchronization for dolphin
Loaded: loaded (/usr/lib/systemd/system/syncthing@dolphin.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-06-10 11:21:51 EDT; 3min 37s ago
Docs: man:syncthing(1)
Process: 9653 ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0 (code=exited, status=203/EXEC)
Main PID: 9653 (code=exited, status=203/EXEC)
CPU: 7ms
Jun 10 11:21:51 MiWiFi-R4CM-srv systemd[1]: syncthing@dolphin.service: Scheduled restart job, restart counter is at 5.
Jun 10 11:21:51 MiWiFi-R4CM-srv systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for dolphin.
Jun 10 11:21:51 MiWiFi-R4CM-srv systemd[1]: syncthing@dolphin.service: Start request repeated too quickly.
Jun 10 11:21:51 MiWiFi-R4CM-srv systemd[1]: syncthing@dolphin.service: Failed with result 'exit-code'.
Jun 10 11:21:51 MiWiFi-R4CM-srv systemd[1]: Failed to start Syncthing - Open Source Continuous File Synchronization for dolphin.
我直接这样执行服务命令:
/usr/bin/syncthing -no-browser -no-restart -logflags=0
工作正常。我想念什么吗?