#!/bin/sh

set -e

echo " + Reloading services..."

for SERVICE in apache2 haproxy postgresql redis-server
do
	if service ${SERVICE} status > /dev/null 2>&1
	then
		echo -n "   + ${SERVICE}:"

		service ${SERVICE} reload || service ${SERVICE} restart

		echo " done."
	fi
done