From ee26681bb95e2e3ce33063e911d47a335d91206a Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Sun, 25 Jun 2017 23:00:52 +0000 Subject: [PATCH] FreeBSD install add monit.sh --- freebsd/resources/monit.sh | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 freebsd/resources/monit.sh diff --git a/freebsd/resources/monit.sh b/freebsd/resources/monit.sh new file mode 100755 index 0000000..7fcb7ce --- /dev/null +++ b/freebsd/resources/monit.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +#move to script directory so all relative paths work +cd "$(dirname "$0")" + +#includes +. ./config.sh + +#install monit +pkg install --yes monit + +#copy the monitor file +cp /usr/local/etc/monitrc.sample /usr/local/etc/monitrc + +#make the monit.d directory +mkdir /usr/local/etc/monit.d + +#add the include for monit.d +echo 'include /usr/local/etc/monit.d/*' >> /usr/local/etc/monitrc + +#set root only permissions +chmod 600 /usr/local/etc/monitrc +chmod 600 /usr/local/etc/monit.d + +#enable monit +echo 'monit_enable="YES"' >> /etc/rc.conf + +#monitor freeswitch +cat > /usr/local/etc/monit.d/freeswitch <