Created
March 13, 2019 03:57
-
-
Save geunho/0c93d074526d2ffd2e77b47240f8c365 to your computer and use it in GitHub Desktop.
register_windows_service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 윈도우 서비스 등록 방법 | |
| 1. ServiceMain을 구현한 바이너리인 경우 | |
| # 생성 | |
| > sc create "%SERVICE_NAME%" binpath= "%ABSOLUTE_BIN_PATH%" start= "auto" | |
| # 삭제 | |
| > sc delete "%SERVICE_NAME%" | |
| 2. 그 외 백그라운드에서 실행되는 모든 바이너리 | |
| http://nssm.cc/ | |
| - 스크립트, 실행파일 등 가리지 않고 서비스로 등록해준다. | |
| - stdout, stderr를 파일로 기록할 수 있고, log rotation도 지원한다. (stdin 지정도 가능) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment