systemd' auth.service'无法找到配置文件

时间:2018-06-07 16:37:27

标签: systemd

我在网络服务器上运行oAuth2代理。到目前为止,我已经在./auth的tmux会话中运行并让它继续运行,但是我希望将其与systemd以外的其他服务一起移动,以便在发生故障时自动启动。

我使用的是我在网上找到的基本脚本,这个脚本对我所投入的其他所有内容都很好,但是这个脚本给了我

Loaded: loaded (/etc/systemd/system/auth.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-06-07 17:25:26 BST; 471ms ago
Process: 29195 ExecStart=/home/pixelburst/auth/auth (code=exited, status=1/FAILURE)

查看journalctl后,我可以看到确切的原因 -

 open config.yaml: no such file or directory

这是我有点卡住的地方。 config.yaml位于auth旁边的/ home / pixelburst / auth /右边,但它看不到它们 - 但是如果我从termnal / home / pixelburst / auth / auth运行它会立即起作用。这是一个真正令人头疼的问题,任何帮助都会非常感激!

当前的auth.service如下 -

[Unit]
Description=Auth
After=network-online.target
[Service]
Type=simple
User=pixelburst
ExecStart=/home/pixelburst/auth/auth
Restart=on-failure
[Install]
WantedBy=multi-user.target

0 个答案:

没有答案