aboutsummaryrefslogtreecommitdiff
path: root/sysutils/munin-main/pkg-deinstall
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2005-03-04 17:45:10 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2005-03-04 17:45:10 +0000
commit7efa776763e3de0c2d3d0eb87fe058a1b0f17ada (patch)
treef1cf2172b6631edaf93d9aeebd5baa9eb874b1a6 /sysutils/munin-main/pkg-deinstall
parent92fda5dd19e34a6354d3df07fe7cd943d08ef7fd (diff)
downloadports-7efa776763e3de0c2d3d0eb87fe058a1b0f17ada.tar.gz
ports-7efa776763e3de0c2d3d0eb87fe058a1b0f17ada.zip
- Update to 1.2.0
- Put logfiles in /var/log/munin-main rather than /var/log - Change group of all munin-main directories to munin - Use SUB_FILES - Add log rotation support - Add @exec mkdir to pkg-plist for package installation PR: ports/77720 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=130367
Diffstat (limited to 'sysutils/munin-main/pkg-deinstall')
-rw-r--r--sysutils/munin-main/pkg-deinstall30
1 files changed, 25 insertions, 5 deletions
diff --git a/sysutils/munin-main/pkg-deinstall b/sysutils/munin-main/pkg-deinstall
index 261b7b15a8b3..200d96a2a617 100644
--- a/sysutils/munin-main/pkg-deinstall
+++ b/sysutils/munin-main/pkg-deinstall
@@ -1,7 +1,4 @@
#! /bin/sh
-#
-# $Log$
-#
ask() {
local question default answer
@@ -80,15 +77,38 @@ delete_crontab_entries() {
echo "These are the remaining lines:"
crontab -u munin -l
else
- crontab -u munin -r
+ echo y | crontab -u munin -r
echo "crontab for user munin removed"
fi
rm $TMPFILE
}
+delnewsyslog() {
+ tmp="/etc/#munin-node$$"
+ sed -e '/^\/var\/log\/munin-main\/\*\.log[ ]/d' /etc/newsyslog.conf >${tmp}
+ cat ${tmp} > /etc/newsyslog.conf
+ rm ${tmp}
+}
+
+newsyslog() {
+ ENTRY=`fgrep '/var/log/munin-main/*' /etc/newsyslog.conf`
+ DEFAULT='/var/log/munin-main/*.log munin:munin 644 7 * @T00 GNWZ'
+ if [ -z "$ENTRY" ]; then
+ exit 0
+ elif [ "$ENTRY" = "$DEFAULT" ]; then
+ delnewsyslog
+ elif yesno "You have changed the default munin-main entry in \"/etc/newsyslog.conf\".
+Do you want me to delete it?" y; then
+ delnewsyslog
+ echo "Done."
+ fi
+}
+
+
case $2 in
DEINSTALL)
- delete_crontab_entries '#BEGIN_MUNIN' '#END_MUNIN'
+ delete_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN'
+ newsyslog
;;
POST-DEINSTALL)
delete_account munin munin