如何让 radarr.service 自动启动?

如何让 radarr.service 自动启动?

我已经成功安装了 radarr,但是只有在使用终端并输入以下内容时它才会运行:

mono ~/Radarr/Radarr.exe

当我关闭终端时,radarr 将停止工作,因此我按照 wiki github 和 varhowto 上的说明使用systemd此命令创建自动启动。

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

我也尝试过使用viman nano。这是我将 vh 改为“david”时使用的文本

[Unit]
Description=Radarr Daemon
After=syslog.target network.target

[Service]
# Change and/or create the required user and group.
User=david
Group=david

Type=simple

# Change the path to Radarr or mono here if it is in a different location for you.
ExecStart=/usr/bin/mono --debug /home/david/Radarr/Radarr.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure

# These lines optionally isolate (sandbox) Radarr from the rest of the system.
# Make sure to add any paths it might use to the list below (space-separated).
#ReadWritePaths=/opt/Radarr /path/to/movies/folder
#ProtectSystem=strict
#PrivateDevices=true
#ProtectHome=true

[Install]
WantedBy=multi-user.target

保存并退出后,运行以下命令:

sudo systemctl enable --now radarr.service

...但是我收到以下错误并且不知道现在该更正什么:

david@david-System-Product-Name:~$ sudo systemctl enable --now radarr.service
Failed to start radarr.service: Unit radarr.service has a bad unit file setting.
See system logs and 'systemctl status radarr.service' for details.
david@david-System-Product-Name:~$ sudo systemctl status radarr.service
Warning: The unit file, source configuration file or drop-ins of radarr.service ch>
● radarr.service - Radarr Daemon
     Loaded: bad-setting (Reason: Unit radarr.service has a bad unit file setting.)
    Drop-In: /etc/systemd/system/radarr.service.d
             └─override.conf
     Active: inactive (dead)

Oct 13 12:13:05 david-System-Product-Name systemd[1]: radarr.service: Service has >
Oct 13 12:16:47 david-System-Product-Name systemd[1]: radarr.service: Service has >

我发誓在我添加 1TB 硬盘并将其归零以用于 Linux 之前,它一直正常工作。我确实出现了 GRUB 屏幕,因此通过 USB 启动在 Linux 中使用该工具并修复了 GRUB 问题。一切都正常,只是 radarr 不会继续运行。正如我提到的,它不会自动启动。我不确定它要求查看的系统日志是什么。

答案1

ExecStart= 路径不正确。我弄清楚了要更改路径,现在它已正常工作。

相关内容