Linuxのスクリプトを起動時に実行するには

/etc/rc.d/rc.local にスクリプト記述すればOK。
以下のような感じ

$ cat /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.

/path/to/script.sh

以上

Leave a Reply

Your email address will not be published.