OS起動時にシェルスクリプトを実行する

—————————————————————————————————-
★「rc.local」に起動コマンドを記述する
—————————————————————————————————-
[root@localhost ~]# vi /etc/rc.d/rc.local

—————————————-
#!/bin/sh
#
# 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.

Comments

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

Leave a comment

(required)

(required)