找不到systemctl avise.service

时间:2020-08-27 15:46:22

标签: service systemd systemctl rhel8

当我将avise.service文件保存在/etc/systemd/system/avise.service中时。我收到not-found错误。

systemctl status avise
● avise.service
   Loaded: not-found (Reason: Unit avise.service not found.)
   Active: failed (Result: exit-code) since Thu 2020-08-27 11:04:58 EDT; 22min ago
 Main PID: 3539430 (code=exited, status=125)

但是当我在/lib/systemd/system/avise.service中保留相同的服务文件时。很好。

但是为什么在第一种情况下不起作用?为什么systemd在第一种情况下找不到文件。如何使用systemd调试此方案。

1 个答案:

答案 0 :(得分:0)

我计算出来,在RHEL 8,我Myservice.service默认的SELinux上下文是unconfined_u:object_r:admin_home_t:s0在/ etc / systemd /系统/,我改成system_u:object_r:systemd_unit_file_t:s0。这就是它!

相关问题