add script to boot centos
hi there!
newbie question again: how can i add a script to boot? I've created a script for my firewall definitions and I've already placed it in /etc/init.d. Now what? thank u very much |
Just add it using chkconfig
Code:
/sbin/chkconfig -add <yourscriptname> Code:
/sbin/chkconfig --levels 3,5 <yourscriptname> on |
thank u!
but i think my script may not support something...check this out: Code:
[root@vas ~]# /sbin/chkconfig -add firewall thx |
How does your firewall script starts with ?
Lets take a sample init.d script mysqld, Here are starting few lines of it. Code:
#!/bin/bash Hope you are missing out this line. Please add above lines to your script. Do change the priority values. |
my script doesn't have that line in fact....
Code:
!/bin/sh |
You can add an entry in /etc/rc.local, like:
Code:
/etc/init.d/myscript.sh ### EDIT ### The script must start with the shebang Quote:
|
i'll add that line thank u very much
|
hi
yes you're right, while copy pasting i missed the cardinal!lol thank u |
I think I got it working!
thank you both!! |
All times are GMT -5. The time now is 10:16 AM. |