[root@localhost ~]# vi /etc/rc.d/rc.local

# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don’t
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

sh /startup.sh

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.


[…] 参考サイト OS起動時にシェルスクリプトを実行する […]

Leave a comment