Buscar este blog

miércoles, 7 de septiembre de 2011

Adding a startup script to be run at bootup RedHat or Similar

Adding a startup script to be run at bootup RedHat or Similar

Create script

[root@lowtrafic ~]# vi /etc/init.d/mystartup.sh

Add Command Line Parameters.
Save file and exit.

Add permission to file

[root@lowtrafic ~]# cd /etc/init.d
[root@lowtrafic ~]# chmod +rwxrxrx mystartup.sh

Adding a startup script to be run at bootup

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

Edit file.

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

/etc/init.d/mystartup.sh
Save file and exit.

Reboot server for test.

No hay comentarios:

Publicar un comentario