summarylogtreecommitdiffstats
path: root/amanda.install
blob: db0b98d0b164ca8b166b8bb598071188104a71e9 (plain)
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
post_install() {
  if [ -z "`getent group amanda`" ]; then
    groupadd -g 112 amanda
  fi
  if [ -z "`getent passwd amanda`" ]; then
    useradd -u 112 -g amanda -G storage,disk -m -d /var/amanda -s /bin/bash -c "Amanda Backup Daemon"  amanda
  fi
  cat << EOT
amanda: Visit the Amanda wiki to configure your backup sets:
amanda:   http://wiki.zmanda.com/index.php/Getting_Started_With_Amanda
amanda: Examples are in /etc/amanda/examples/

amanda: Restart xinetd to start the daemon listening for connections.
EOT
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  userdel amanda || true &> /dev/null
  groupdel amanda || true &> /dev/null
}

op=$1
shift

$op $*