Commit 13cc223f authored by Patrick J Cherry's avatar Patrick J Cherry
Browse files

Merge branch 'stretch-monit-move-conffiles' into 'stretch'

Move monit.d config files into /usr/share and symlink them from /etc

See merge request !47
parents 84e1e331 27c05058
exim4/ etc/
dovecot/ etc/
sbin/ usr/
symbiosis/ etc/
symbiosis/firewall etc/symbiosis
symbiosis/test.d etc/symbiosis
symbiosis/monit.d/* usr/share/symbiosis/monit/checks/
......@@ -6,3 +6,8 @@ rm_conffile /etc/symbiosis/monit.d/clamav-freshclam 2014:1231
rm_conffile /etc/symbiosis/test.d/exim4_acl_tests/testy 2010:0101
rm_conffile /etc/symbiosis/test.d/exim4_acl_tests/test2 2010:0101
rm_conffile /etc/symbiosis/test.d/exim4_acl_tests/test3 2010:0101
rm_conffile /etc/symbiosis/monit.d/spamassassin 2016:0101
rm_conffile /etc/symbiosis/monit.d/exim4 2016:0101
rm_conffile /etc/symbiosis/monit.d/dovecot 2016:0101
rm_conffile /etc/symbiosis/monit.d/clamav-freshclam 2016:0101
rm_conffile /etc/symbiosis/monit.d/clamav-daemon 2016:0101
......@@ -136,12 +136,26 @@ if [ -e /etc/dovecot/Makefile ] ; then
cd /etc/dovecot && make dovecot.conf
fi
monit_dir="/etc/symbiosis/monit.d"
mkdir -p "$monit_dir"
#
# Restart all deamons
#
for i in exim4 dovecot spamassassin clamav-daemon symbiosis-email-dict-proxy symbiosis-email-poppassd; do
# spamassassin + clamav-daemon might not be installed. Wrap the invokation.
service $i restart || true
#
# Add symlinks for our symbiosis monit scripts (one per service, possibly)
#
monit_script="/usr/share/symbiosis/monit/checks/$i"
link_target="$monit_dir/$i"
if [ -x "$monit_script" ] && [ ! -e "$link_target" ] ; then
echo "I: Adding symlink for Symbiosis Monit script for $i"
ln -s "$monit_script" "$link_target" || true
fi
done
#DEBHELPER#
......
......@@ -4,7 +4,7 @@ rule.d usr/share/symbiosis/firewall
action.d usr/share/symbiosis/firewall
test.d etc/symbiosis
incron.d etc/
monit.d etc/symbiosis
monit.d/* usr/share/symbiosis/monit/checks/
incoming.d etc/symbiosis/firewall
outgoing.d etc/symbiosis/firewall
local.d etc/symbiosis/firewall
......
rm_conffile /etc/symbiosis/monit.d/incrond 2017:0424
......@@ -16,6 +16,23 @@ PREFIX=/etc/symbiosis/firewall
chown -R admin:admin $PREFIX
#DEBHELPER#
#
# Add symlinks for the monit script
monit_dir="/etc/symbiosis/monit.d"
mkdir -p "$monit_dir"
for i in incrond; do
monit_script="/usr/share/symbiosis/monit/checks/$i"
link_target="$monit_dir/$i"
if [ -x "$monit_script" ] && [ ! -e "$link_target" ]; then
echo "I: Adding symlink for Symbiosis Monit script for $i"
ln -s "$monit_script" "$link_target" || true
fi
done
exit 0
sbin/* usr/sbin/
default/* etc/default/
monit.d/* etc/symbiosis/monit.d/
monit.d/* usr/share/symbiosis/monit/checks/
test.d/* etc/symbiosis/test.d/
patterns.d/* etc/symbiosis/firewall/patterns.d/
lib/* usr/lib/ruby/vendor_ruby/
......
rm_conffile /etc/symbiosis/monit.d/pure-authd 2014:1231
rm_conffile /etc/symbiosis/monit.d/pure-ftpd 2017:0424
......@@ -74,10 +74,24 @@ if [ -e /etc/ssl/private/pure-ftpd.pem ] ; then
fi
fi
#DEBHELPER#
#
# Add symlinks for the monit script
monit_dir="/etc/symbiosis/monit.d"
mkdir -p "$monit_dir"
for i in pure-ftpd; do
monit_script="/usr/share/symbiosis/monit/checks/$i"
link_target="$monit_dir/$i"
if [ -x "$monit_script" ] && [ ! -e "$link_target" ]; then
echo "I: Adding symlink for Symbiosis Monit script for $i"
ln -s "$monit_script" "$link_target" || true
fi
done
invoke-rc.d pure-ftpd restart
exit 0
sbin usr/
test.d etc/symbiosis/
apache.d etc/symbiosis/
monit.d etc/symbiosis/
monit.d/* usr/share/symbiosis/monit/checks/
bytemark/* usr/share/symbiosis/static/
apache2 etc/
php etc/
rm_conffile /etc/symbiosis/monit.d/apache2 2017:0424
......@@ -75,4 +75,20 @@ symbiosis-httpd-configure --no-reload --verbose
#DEBHELPER#
#
# Add symlinks for the monit script
monit_dir="/etc/symbiosis/monit.d"
mkdir -p "$monit_dir"
for i in apache2; do
monit_script="/usr/share/symbiosis/monit/checks/$i"
link_target="$monit_dir/$i"
if [ -x "$monit_script" ] && [ ! -e "$link_target" ]; then
echo "I: Adding symlink for Symbiosis Monit script for $i"
ln -s "$monit_script" "$link_target" || true
fi
done
exit 0
rm_conffile /etc/symbiosis/monit.d/cron 2017:0424
rm_conffile /etc/symbiosis/monit.d/sshd 2017:0424
......@@ -46,4 +46,21 @@ fi
mkdir -p /var/lib/symbiosis/
#DEBHELPER#
#
# Add symlinks for the monit script
monit_dir="/etc/symbiosis/monit.d"
mkdir -p "$monit_dir"
for i in cron sshd; do
monit_script="/usr/share/symbiosis/monit/checks/$i"
link_target="$monit_dir/$i"
if [ -x "$monit_script" ] && [ ! -e "$link_target" ]; then
echo "I: Adding symlink for Symbiosis Monit script for $i"
ln -s "$monit_script" "$link_target" || true
fi
done
exit 0
sbin/symbiosis-monit usr/sbin/
monit.d/* etc/symbiosis/monit.d/
monit.d/* usr/share/symbiosis/monit/checks/
templates/* usr/share/symbiosis/monit/
lib/* usr/lib/ruby/vendor_ruby/
test.d/* etc/symbiosis/test.d/
......
monit.d etc/symbiosis
monit.d/* usr/share/symbiosis/monit/checks/
mysql etc
rm_conffile /etc/symbiosis/monit.d/mysqld 2017:0424
......@@ -12,6 +12,22 @@ fi
#DEBHELPER#
#
# Add symlinks for the monit script
monit_dir="/etc/symbiosis/monit.d"
mkdir -p "$monit_dir"
for i in mysqld; do
monit_script="/usr/share/symbiosis/monit/checks/$i"
link_target="$monit_dir/$i"
if [ -x "$monit_script" ] && [ ! -e "$link_target" ]; then
echo "I: Adding symlink for Symbiosis Monit script for $i"
ln -s "$monit_script" "$link_target" || true
fi
done
#
# Restart mysql just in case the config has been modified.
#
......
monit.d /etc/symbiosis/
monit.d/* /usr/share/symbiosis/monit/checks/
templates.d/* /etc/symbiosis/xmpp.d
sbin/* /usr/sbin
rm_conffile /etc/symbiosis/monit.d/prosody 2017:0424
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment