I have created a shell with necessary functions such as start() stop() restart()
But my file is not getting started at boot time.
I have used
If you need to run your command only at system start (just after boot): edit /etc/rc.local that is your file.
By default it contains just comments (Designated Driver, but this was the case in some earlier versions also):
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
You can add commands here.
My example:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
if grep -q '/dev/sdb2' /proc/swaps ; then swapoff /dev/sda2 ; fi
comgt -s /etc/config/init-script.comgt