On Debian-based systems adding a script to runlevels is accomplished with the following (assuming you have the script in /etc/init.d):
update-rc.d -f myservicename start 80 2 3 4 5 . stop 30 0 1 6 .
The priority (80 for start and 30 for
stop) is set and the runlevels (starting in 2 3 4 5 and stopping in 0 1 6) in which the script will be executed.
To remove it from the runlevels :
update-rc.d -f myservicename remove