반응형
서비스를 실행하려면 .service 파일이 필요하다.
서비스 파일이 없이 서비스를 등록하려고 하면 Unit not found. 해당 에러가 발생한다.
systemctl enable ba.internalserverd
파일을 생성해준다. 현재 개인 프로젝트의 서버 등록을 위해 ba.internalserverd.service 로 파일을 만들어준다.
vi /etc/systemd/system/ba.internalserverd.service
[Unit]
Description=BA.InterServer.dll
[Service]
WorkingDirectory=/ba/bin/interserver
ExecStart=/usr/bin/dotnet /ba/bin/interserver/BA.InterServer.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=BA.InterServer
[Install]
WantedBy=multi-user.target
파일을 생성 후에 다시 등록
systemctl enable ba.internalserverd
서비스를 실행시킨다.
systemctl start ba.internalserverd
반응형
'개발관련 > ETC..' 카테고리의 다른 글
Https 적용하기 (0) | 2024.03.11 |
---|---|
aws ec2 프리티어 메모리 부족 (0) | 2023.09.22 |
Apple revoke token 처리 (0) | 2022.07.09 |
AWS CodeBuild, CodeDeploy (0) | 2019.07.25 |
객체 지향 설계의 원칙>SOLID (0) | 2019.05.08 |