다음 권한을 가진 폴더 tdk-api.service
에 이 유닛 파일을 만들었습니다 ./etc/systemd/system
-rwxr-xr-x
다음 콘텐츠가 포함되어 있습니다:
[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
하지만 시작 시 오류가 발생합니다.
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#
또한 제안된 대로 systemd 데몬을 다시 로드해 보았습니다.
systemctl daemon-reload
나는 또한 다음을 시도했습니다.
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 ''