Should it be System V style ("/etc/init.d/solunas start|stop|restart").
The problem is the script should have predefined path to the installation directory of Solunas.
If so, on which runlevel should it be set (in most cases the default runlevel is 5 or 2)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Regarding path to installation directory: This can be a variable with a default as per the LSB. We could still leave it to packagers for the specific distros how they would change this, i.e. I never understood if this should be in /opt, /usr/share, ...
The common scenario for making such script running on the defalt runlevel is as follows:
# make sure the current user is "root": `id -u` should be equal to 0
# change the directory appropriately:
cd /etc/rc`runlevel | cut -f2 -d' '`.d
# create a sym link with a relative path:
ln -s ../init.d/solunas.sh S99solunas.sh
On System V based Linux systems (Debian/RH/etc.) the startup scripts are in /etc/init.d, the policy that defines when they are started/stopped is just a sym link in /etc/rc[1|2|3|5|6].d directories; depending on the 1st char ("S" or "K") the script is being started ("S") or stopped ("K", probably means "killed").
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Should it be System V style ("/etc/init.d/solunas start|stop|restart").
The problem is the script should have predefined path to the installation directory of Solunas.
If so, on which runlevel should it be set (in most cases the default runlevel is 5 or 2)?
Yes, System V style for *ix systems.
Regarding path to installation directory: This can be a variable with a default as per the LSB. We could still leave it to packagers for the specific distros how they would change this, i.e. I never understood if this should be in /opt, /usr/share, ...
Runlevels: Check http://en.wikipedia.org/wiki/Runlevel.
IMO: 3; 2 is "without network and deamons".
The common scenario for making such script running on the defalt runlevel is as follows:
# make sure the current user is "root": `id -u` should be equal to 0
# change the directory appropriately:
cd /etc/rc`runlevel | cut -f2 -d' '`.d
# create a sym link with a relative path:
ln -s ../init.d/solunas.sh S99solunas.sh
On System V based Linux systems (Debian/RH/etc.) the startup scripts are in /etc/init.d, the policy that defines when they are started/stopped is just a sym link in /etc/rc[1|2|3|5|6].d directories; depending on the 1st char ("S" or "K") the script is being started ("S") or stopped ("K", probably means "killed").