3

I Created this Unit file tdk-api.service in the /etc/systemd/system folder with this permissions: -rwxr-xr-x

with this content:

[Unit]
Description = tdk API daemon

[Service]
Type = simple
ExecStart =  /usr/local/bin/start-tdk-api.sh
ExecStop =   /usr/local/bin/stop-tdk-api.sh
ExecReload = /usr/local/bin/reload-tdk-api.sh

[Install]
WantedBy = multi-user.target

But I have an error when starting:

root@localhost:/etc/systemd/system# sudo systemctl start tdk-api
Failed to start tdk-api.service: Unknown unit: tdk-api.service
See system logs and 'systemctl status tdk-api.service' for details.
root@localhost:/etc/systemd/system# systemctl status tdk-api.service
Failed to get properties: No such interface ''
root@localhost:/etc/systemd/system# 

I also tried to reload systemd daemon, as suggested

systemctl daemon-reload

I also tried:

root@localhost:/etc/systemd/system# systemctl enable tdk-api.service
Configuration file /etc/systemd/system/tdk-api.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Created symlink /etc/systemd/system/multi-user.target.wants/tdk-api.service, pointing to /etc/systemd/system/tdk-api.service.
root@localhost:/etc/systemd/system# sudo systemctl start tdk-api
Failed to start tdk-api.service: Unknown unit: tdk-api.service
See system logs and 'systemctl status tdk-api.service' for details.
root@localhost:/etc/systemd/system# systemctl status tdk-api.service
Failed to get properties: No such interface ''

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.