File: prerm

package info (click to toggle)
mon 0.99.2-9%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 908 kB
  • ctags: 299
  • sloc: perl: 9,801; ansic: 778; sh: 372; makefile: 122
file content (26 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh -e

# $Id: prerm,v 1.4 2001/03/09 23:01:10 roderick Exp $

# Remove local mon.d/alert.d, but don't fail if it fails.

for dir in lib/mon/mon.d lib/mon/alert.d lib/mon
do
    dir=/usr/local/$dir
    rmdir $dir 2>/dev/null || :
done

# Before 0.38.14 the daemon ran as daemon.daemon and the directories
# it had to write to were root.daemon set-gid.  After it runs as
# daemon.shadow and the directories are owned by daemon.

if [ x-"$1" = x-upgrade -a $# = 2 ] &&
	dpkg --compare-versions "$2" lt 0.38.14
then
    dirs='/var/log/mon /var/run/mon /var/state/mon'
    chown -R daemon:daemon $dirs
    chown root:daemon $dirs
    chmod 2775 $dirs
fi

#DEBHELPER#