function configure_ejabberd {
echo _.-~= configuring ejabberd
echo stopping ejabberd
- systemctl stop ejabberd.service
+ if [ -e /etc/init.d/ejabberd ]; then
+ /etc/init.d/ejabberd stop
+ else
+ systemctl stop ejabberd.service
+ fi
if [ ! "$(grep 'public.localhost' /etc/ejabberd/ejabberd.yml)" ]; then
cd /etc/ejabberd/
cp ejabberd.yml /root/ejabberd.yml
fi;
echo starting ejabberd after patching
date
- systemctl start ejabberd.service
+ if [ -e /etc/init.d/ejabberd ]; then
+ /etc/init.d/ejabberd start
+ else
+ systemctl start ejabberd.service
+ fi
echo Return Value = $?
sleep 10;
echo End of configuring ejabberd =~-._
echo Return Value = $?
echo After OpenSRF is up and running, fire up the secondary Apache instance.
- #/etc/init.d/apache2-websockets start
- systemctl start apache2@websockets.service
+ if [-e /etc/init.d/apache2-websockets ]; then
+ /etc/init.d/apache2-websockets start
+ else
+ systemctl start apache2@websockets.service
+ fi
echo Return Value = $?
echo End of configuring websockets =~-._