【发布时间】:2017-03-19 06:48:23
【问题描述】:
我想将 syncthing 作为守护进程运行,尝试遵循 syncthing 手册中的 this hint here。
我在 Fedora 25 和 syncthing 0.14.24 上运行。
可执行文件通过/usr/bin/syncthing 中的符号链接指向,任何用户都可以执行(测试成功)。
要启用该服务,我正在输入(myuser 在以下所有内容中都替换为我的实际用户名):
sudo systemctl enable sycnthing@myuser.service
返回:
Failed to lookup unit file state: Invalid argument
我不明白错误消息的含义。我怎样才能将 syncthing 作为守护进程运行?
syncthing@myuser.service:
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target
Wants=syncthing-inotify@myuser.service # I also commented this line out; didn't have an effect
[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
[Install]
WantedBy=multi-user.target
【问题讨论】:
标签: linux daemon systemd fedora-25 syncthing