1 # This is appended to packaging/deb/amanda-backup-*.postinst
4 # Note: this script needs to do the same things in all maintainer
5 # script cases: configure, abort-remove, abort-upgrade.
7 LOGFILE=`mktemp /tmp/amanda-postinst.log.XXXXXXXXXXX`
9 echo "Unable to create log file!"
12 amanda_user=amandabackup
14 AMANDAHOMEDIR=%%AMANDAHOMEDIR%%
18 INSTALL_LOG="${LOGDIR}/install.log"
23 AMANDATES=${SYSCONFDIR}/amandates
25 # ---------- Common functions ------------
27 %%POST_INST_FUNCTIONS%%
29 # -------- End Common functions ----------
31 check_xinetd "amanda${pkg_type}"
33 0) backup_xinetd "amanda${pkg_type}"
34 install_xinetd "amanda${pkg_type}"
36 1) install_xinetd "amanda${pkg_type}" ;;
37 2) logger "Xinetd config not installed: either xinetd config is not present or xinetd.d is a file." ;;
38 *) logger "bad return from check_xinetd"
39 cat ${LOGFILE} >> ${INSTALL_LOG}
44 # amanda${pkg_type} should not have the amanda${other_pkg_type} xinetd installed.
45 check_xinetd "amanda${other_pkg_type}"
47 0) backup_xinetd "amanda${other_pkg_type}" ;;
56 check_amandahosts_entry root amindexd amidxtaped
57 check_amandahosts_entry ${amanda_user} amdump
58 check_amandahosts_perms
59 create_ssh_key ${pkg_type}
60 if [ "${pkg_type}" = "server" ]; then
61 create_ssh_key ${other_pkg_type}
69 logger "Amanda ${pkg_type} installation complete."
70 cat $LOGFILE >> $INSTALL_LOG && {
72 echo "Amanda installation log can be found in '${INSTALL_LOG}'.";
74 echo "Amanda installation log can be found in '${LOGFILE}'.";