These commands are defined as part of the Linux Standard Base (LSB), as @AndreKR notes.
However, on some systems, such as Redhat (and possibly SUSE), depending on the installed packages, these functions may not be detected at the location indicated by LSB, which is equal to /lib/lsb/init-functions . Rather, they are defined within /etc/init.d/functions . In addition, in some versions of the Redhat variant /etc/init.d/functions no LSB function start_daemon function. If you add the following snippet at the top of your script, it should be portable for most distributions / installations:
if [[ -f /lib/lsb/init-functions ]]; then . /lib/lsb/init-functions elif [[ -f /etc/init.d/functions ]]; then . /etc/init.d/functions
Raman
source share