File: postinst

package info (click to toggle)
checksecurity 2.0.16%2Bnmu3
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 260 kB
  • sloc: sh: 285; perl: 202; makefile: 74
file content (36 lines) | stat: -rw-r--r-- 874 bytes parent folder | download | duplicates (7)
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
27
28
29
30
31
32
33
34
35
36
#!/bin/sh -e
#
# Tell the user about the old configuration file.
#
. /usr/share/debconf/confmodule
if [ "$1" = "configure" ] && [ -z "$2" ] && [ -f /etc/checksecurity.conf.cron ] ; then
        db_input low checksecurity/oldconf || true
        db_go || true
fi
db_stop


#
# If there is not a /var/log/setuid directory create it, and move
# any old logfiles into it.
#
if [ ! -d /var/log/setuid ]; then
	mkdir -m 750 /var/log/setuid 
	chown root:adm /var/log/setuid || true
	for file in /var/log/setuid.yesterday /var/log/setuid.today /var/log/setuid.changes \
		/var/log/setuid.changes.*; do
		[ ! -e $file ] || mv $file /var/log/setuid 
	done
fi
#
# If there is no /var/log/checksecurity directory create it, and move
#
if [ ! -d /var/log/checksecurity ]; then
	mkdir -m 750 /var/log/checksecurity 
	chown root:adm /var/log/checksecurity || true
fi


#DEBHELPER#

exit 0