2016년 5월 29일 일요일

rc.local 서비스 등록하기


#vim /usr/lib/systemd/system/rc-local.service


 


빨간색 부분을 추가한다.


 



#  This file is part of systemd.


#


#  systemd is free software; you can redistribute it and/or modify it


#  under the terms of the GNU General Public License as published by


#  the Free Software Foundation; either version 2 of the License, or


#  (at your option) any later version.


 


# This unit gets pulled automatically into multi-user.target by


# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.


[Unit]


Description=/etc/rc.d/rc.local Compatibility


After=network.target


 


[Service]


Type=forking


ExecStart=/etc/rc.d/rc.local start


TimeoutSec=0


RemainAfterExit=yes


SysVStartPriority=99


 


[Install]


WantedBy=multi-user.target


 


/etc/rc.d/rc.local 파일을 생성하고, 실행가능하도록


 



#chmod 755 /etc/rc.d/rc.local


#systemctl enable rc-local.service


#systemctl start rc-local.service

댓글 없음:

댓글 쓰기