[linux] daemon 설정

정리맨·2022년 5월 30일
0

vi /etc/systemd/system/testchk.service

// /etc/systemd/system/testchk.service 내용
[Unit]
Description=Systemd Test Daemon

[Service]
Type=simple
ExecStart=/root/test-daemon.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target

마지막 인스톨 부분이 enable 부분

출처 : https://chhanz.github.io/linux/2019/01/18/linux-how-to-create-custom-systemd-service/

profile
ㅎㅎ

0개의 댓글