linux startup script help
i have a perl script that checks netstat if an ip has more tan 50 connections it bans the ip from server with iptables how can i make this script starts on linux startup and it will be working when the server is workingthe scriptname is check.pl
is it enough
ln -sf /root/check.pl /etc/rc.d/init.d/check.pl
ln -sf /etc/rc.d/init.d/check.pl /etc/rc.d/rc2.d/check.pl
ln -sf /etc/rc.d/init.d/check.pl /etc/rc.d/rc3.d/check.pl
ln -sf /etc/rc.d/init.d/check.pl /etc/rc.d/rc4.d/check.pl
ln -sf /etc/rc.d/init.d/check.pl /etc/rc.d/rc5.d/check.pl
chkconfig --level 2345 check.pl on
or inittab
etc/inittab adding
check:2345:respawn:/usr/local/sbin/check.pl