#!/bin/bash -e

. ./xi-sys.cfg

# Was previous step completed?
if [ ! -f installed.importnagiosql ]; then
	echo "NagiosQL data was not imported - run previous script" >&2
	exit 1
fi

for svc in $httpd nagios npcd $ntpd $crond; do
	if [ ! `command -v systemctl` ]; then
	    service $svc restart
	else
	    systemctl restart $svc
	fi
done

echo "Daemons started OK"

