APPNAME=mailleur
DAEMON=receiver
-DAEMON_PID=/run/${APPNAME}/${DAEMON}.lock
#checking profile
if [ -f /etc/profile ] ; then
. /etc/profile
fi
-# Some functions to make the below more readable
-
-#loading load configuration file
-if [ -f /etc/sysconfig/$APPNAME ] ; then
- . /etc/sysconfig/$APPNAME
-fi
-
#--------------------------------------------------------------
#to start all mailleur daemon
#--------------------------------------------------------------
case "$OS" in
"sysv" | \
"osukiss" )
- for action in %{name}
+ for action in %{name} receiver sorter
do
%{_initrddir}/${action} stop > /dev/null 2>&1 || :
%{_sbindir}/chkconfig --del ${action}
case "$OS" in
"sysv" | \
"osukiss" )
- for action in %{name}
+ for action in %{name} receiver sorter
do
%{__ln_s} \
%{_datadir}/%{name}/linux/$OS/${action} \
%{_initrddir}/${action}
done
+ %{_sbindir}/chkconfig --add %{name}
+ %{_sysconfdir}/rc.d/init.d/%{name} condrestart > /dev/null 2>&1 || :
;;
* )
echo "Unable to find distribution"