-2

At present, the state state of the service file shows not-found, but the service is still running. May I ask what causes this:

test.service source files in the/opt directory , its Execstart=/usr/sbin/start.sh also is in the/opt directory, both file is through the soft connection form respectively in the/etc/systemd/system/multi - user.targets.Wants and /usr/sbin. If these files and the soft connection are subsequently updated by the script and systemctl daemon-reload is executed again, the service status will be not-found and the service will log:

Current command vanished from the unit file, execution of the command list won't be resumed.

In essence, it may cause an error because the soft connection in systemd can not find the actual source file, but my files have been placed in the actual place, and can also be displayed normally. Is there any reason why the service source file can not be found?

ā— test.service Loaded: not-found (Reason: No such file or directory) Active: active (running) since Mon 2023-08-28 11:39:30 CST; 43min ago Main PID: 25590 (start.sh) Tasks: 1109 (limit: 4915) CGroup: /system.slice/test.service

In essence, it may cause an error because the soft connection in systemd can not find the actual source file, but my files have been placed in the actual place, and can also be displayed normally. Is there any reason why the service source file can not be found?

  • I’m voting to close this question because as the systemd tag states: systemd questions should be for *programming questions* using systemd or its libraries. Questions about *configuring the daemon* (including writing unit files) are better directed to Unix & Linux: https://unix.stackexchange.com. Please delete this. – Rob Aug 30 '23 at 08:05
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 30 '23 at 17:54

0 Answers0