3 . /usr/share/debconf/confmodule
5 if [ "$1" = configure ]; then
6 useradd -d /var/backups -c backup -s /bin/sh \
7 -u 34 -g 34 backup 2> /dev/null
9 if [ ! -f /var/backups/.profile ]; then
10 echo 'PATH="$PATH:/usr/sbin"' > /var/backups/.profile
13 groupadd -g 34 backup 2> /dev/null
14 groupadd -g 26 tape 2> /dev/null
19 # in case we get installed first
20 if [ ! -d /var/lib/amanda ]; then
21 mkdir -p /var/lib/amanda
24 # try to handle a /var/lib/amandates file, since we created it
25 # incorrectly in previous versions of the amanda packages for Debian
26 if [ -f /var/lib/amandates ]; then
27 if [ ! -f /var/lib/amanda/amandates ]; then
28 mv /var/lib/amandates /var/lib/amanda/amandates
32 # make sure amandates exists and has the right perms
33 if [ ! -f /var/lib/amanda/amandates ]; then
34 touch /var/lib/amanda/amandates
36 chown backup:backup /var/lib/amanda/amandates
38 # make sure user backup has a home directory
39 if [ ! -d ~backup ]; then
43 # make sure there is a .amandahosts symlink
44 if [ ! -L ~backup/.amandahosts ]; then
45 ln -sf /etc/amandahosts ~backup/.amandahosts
48 # make sure /var/log/amanda exists
49 if [ ! -d /var/log/amanda ]; then
50 mkdir -p /var/log/amanda
53 chown backup:backup ~backup/.amandahosts /etc/amandahosts \
55 chmod 600 ~backup/.amandahosts /etc/amandahosts
56 chmod 770 /var/log/amanda