## Munin on monitor servers.
if [ -e "$WD/Munin/munin-cron.crontab" ] ### This file only should exist on a monitoring server.
then
- if crontab -u munin "$WD/Munin/munin-cron.crontab" then sleep 2 echo "Running munin-cron manually for first time." echo "This may take a while the first time..."
+ if crontab -u munin "$WD/Munin/munin-cron.crontab"; then sleep 2 echo "Running munin-cron manually for first time." echo "This may take a while the first time..."
sudo su -c munin-cron --shell=/bin/bash munin
else
echo "Failed to install crontab for munin. Not running"
}
Add_PG_APT_Repo () {
-if [ -z /etc/apt/sources.list.d/pgdg.list ]; then
- wget https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
+if [ ! -e /etc/apt/sources.list.d/pgdg.list ]; then
+ $APT_TOOL install curl ca-certificates gnupg
+ curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
fi
}