我正在使用apache编译000-defualt.conf文件,经常在vim,save和下次运行service apache2 restart 。
service apache2 restart
当对该文件进行更改时,有哪些选项可以自动重启apache?
只需使用inotifywait (安装发行版的inotify-tools软件包):
inotify-tools
while inotifywait -e close_write 000-defualt.conf; do service apache2 restart; done