#!/bin/sh
# Copyright (C) 2000-2017 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#

sbindir=@sbindir@
sysconfdir=@sysconfdir@
INSTALL_CONFIG="@INSTALL@ -m 640"
DESTDIR=`echo ${DESTDIR}`

srcconf=bacula-tray-monitor.conf
if  test -f ${DESTDIR}${sysconfdir}/${srcconf}; then
  destconf=${srcconf}.new
  echo "  ==> Found existing $srcconf, installing new conf file as ${destconf}"
else
  destconf=${srcconf}
fi
echo "${INSTALL_CONFIG} ${srcconf} ${DESTDIR}${sysconfdir}/${destconf}"
${INSTALL_CONFIG} ${srcconf} ${DESTDIR}${sysconfdir}/${destconf}
