File: postinst

package info (click to toggle)
afbackup 3.3.6pl4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,872 kB
  • ctags: 3,143
  • sloc: ansic: 44,316; tcl: 4,189; sh: 2,263; csh: 2,077; makefile: 566; sed: 93; perl: 80
file content (37 lines) | stat: -rw-r--r-- 945 bytes parent folder | download
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
37
#!/bin/sh -e

case "$1" in
    configure)
	case "$2" in
	    2.6*)
	        echo "Moving state files to new location!"
                mv /var/log/afbackup/tapepos /var/lib/afbackup > /dev/null 2>&1 || true
	     ;;
        esac    
        # continue below
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
        exit 0
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

update-inetd --group OTHER --add "afbackup stream tcp     nowait  root    /usr/sbin/afserver server /etc/afbackup/server.conf" 

if [ ! -f /etc/afbackup/cryptkey ]; then
    echo "Please supply a encryption key for client/server authentication"
    echo "It should be at least 5 characters and must be the same everywhere in your network."
    stty -echo
    read key
    stty echo
    touch /etc/afbackup/cryptkey
    chmod 600 /etc/afbackup/cryptkey
    echo $key >> /etc/afbackup/cryptkey
fi

#DEBHELPER#