I created a app and the service file , You can start / stop / restart the service ... I want to start that service at the time of booting of Suse Enterprise linux , I tried adding that file in /etc/init.d/my-service but its not getting started on boot
You have to add this file into desired runlevel. For example:
sudo update-rc.d my-service default
Will add it into default runlevel in Debian-based distros. Also, be sure that the file has such structure:
#!/bin/bash case "$1" in start) #do startup commands ;; stop) #do stop commands ;; esac
However, in SUSE Linux there is
/etc/init.d/skeleton that should be edited to create new scripts. This skeleton contains special comments (they are comments for the shell, but used by YaST) to describe on which runlevels the start/stop must be.
Once done, the script will show in YaST → System → System Services (runlevel) and can be switched on/off from there (making the links, etc).
To enable a service you can also use
chkconfig, as in:
chkconfig --set someservice on
chkconfig --set someservice off
and the appropriate links will be created/deleted. For finer control over levels, you can use
chkconfig --level 35 someservice on
Source: OpenSUSE update-rc.d equivalent.