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 groupadd -g 34 backup 2> /dev/null
10 groupadd -g 26 tape 2> /dev/null
12 usermod -G disk,tape backup
14 # in case we get installed first
15 if [ ! -d /var/lib/amanda ]; then
16 mkdir -p /var/lib/amanda
19 # try to handle a /var/lib/amandates file, since we created it
20 # incorrectly in previous versions of the amanda packages for Debian
21 if [ -f /var/lib/amandates ]; then
22 if [ ! -f /var/lib/amanda/amandates ]; then
23 mv /var/lib/amandates /var/lib/amanda/amandates
27 # make sure amandates exists and has the right perms
28 if [ ! -f /var/lib/amanda/amandates ]; then
29 touch /var/lib/amanda/amandates
31 chown backup:backup /var/lib/amanda/amandates
33 # make sure user backup has a home directory
34 if [ ! -d ~backup ]; then
38 # make sure there is a .amandahosts symlink
39 if [ ! -L ~backup/.amandahosts ]; then
40 ln -sf /etc/amandahosts ~backup/.amandahosts
42 chown backup:backup ~backup/.amandahosts /etc/amandahosts
43 chmod 660 ~backup/.amandahosts /etc/amandahosts