#!/bin/sh
#
# Restart the daemons which might have changed the configuration
# during install

set -e

cd /etc/init.d

for service in \
    networking \
    sysklogd \
    ntpdate ntp-refclock \
    inetd \
    bind9 \
    slapd \
    nscd \
    dhcp3-server \
    courier-authdaemon courier-imap \
    apache \
    samba \
    squid \
    webmin \
    nfs-common nfs-kernel-server \
    autofs \
    ssh \
    mysql postgresql \
    xfs \
    ;
    do
  if test -x $service ; then
      echo "info: Restarting '$service'."
      # Andreas claimed that 'restart' do not work for slapd.  Use stop/start
      # instead. [pere 2002-08-28]
      ./$service stop || true
      sleep 1
      ./$service start || true
  else
      echo "warning: Not restarting '$service', as init.d script is missing."
  fi
done

exit 0
