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
Make sure the first line of your script reads:
#!/bin/sh /etc/rc.common
Copy your script to the /etc/init.d/ directory
Make sure the execute bit is on
chmod +x /etc/init.d/
Enable your script
/etc/init.d/ enable
Your script should now have a symlink in /etc/rc.d/
ls -lh /etc/rc.d | grep
Confirm your init script is enabled:
/etc/init.d/ enabled && echo on
If this command returns on, then you're all set. If this command doesn't return anything, then your script isn't enabled. Here's an example of a script that's enabled:
root@OpenWrt:~# /etc/init.d/system enabled && echo on
on
I've tested these steps on OpenWrt Chaos Calmer 15.05 but it should work on earlier versions. Good luck!