====== Ubuntu Service ====== * Ubuntu에서 Service의 등록과 실행 등 * Ubuntu 는 15.x 부터 [[linux:systemd|systemd]] 기반으로 전환되었다. * [[https://help.ubuntu.com/community/UbuntuBootupHowto|Ubuntu Bootup Howto]] ===== Boot-Up Manager ===== * ''sudo apt-get install bum'' * 각종 서비스의 시작/종료/자동시작 지정등을 할 수 있다. ===== Service 자동 시작 ===== * [[http://askubuntu.com/questions/9382/how-can-i-configure-a-service-to-run-at-startup|How can I configure a service to run at startup]] * ''sysv-rc-conf'' 패키지를 설치해 CUI 로 적용할 수 있다. * ''update-rc.d'' 명령 # 서비스 자동 시작 등록 sudo update-rc.d 서비스명 defaults # 자동 시작 제거 sudo update-rc.d 서비스명 remove ===== Run Level ===== * [[http://linuxconfig.org/how-to-check-a-current-runlevel-of-your-linux-system|현재의 Run Level 체크]] runlevel # or who -r ===== Startup/Shutdown 시 실행할 Script 지정 ===== * [[http://en.kioskea.net/faq/3348-ubuntu-executing-a-script-at-startup-and-shutdown|Executing a script at startup and shutdown]] * ''/etc/rc.local'' : 시작시 실행할 명령. ''x'' 실행 비트가 활성화 돼 있는지 확인해 볼것. * ''/etc/rc6.d/*'' : 종료시 실행할 명령 * 파일은 모두 ''chmod +x'' 로 실행권한이 있어야 함. * 파일 이름은 ''K99_''로 시작하게 할 것. ===== 참조 ===== * [[https://askubuntu.com/questions/19320/how-to-enable-or-disable-services|upstart - How to enable or disable services? - Ask Ubuntu]]