~libravatar/libravatar/master

443 by Francois Marier
Create a new libravatar-master package
1
#!/bin/bash
2
#
3
# see: dh_installdeb(1)
4
5
set -e
6
7
# summary of how this script can be called:
8
#        * <postinst> `configure' <most-recently-configured-version>
9
#        * <old-postinst> `abort-upgrade' <new version>
10
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
11
#          <new-version>
12
#        * <postinst> `abort-remove'
13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
14
#          <failed-install-package> <version> `removing'
15
#          <conflicting-package> <version>
16
# for details, see http://www.debian.org/doc/debian-policy/ or
17
# the debian-policy package
18
19
AVATAR_ROOT=/var/lib/libravatar/avatar
20
MASTER_ROOT=/var/lib/libravatar/master
21
22
case "$1" in
23
    configure)
782.1.1 by Francois Marier
Reverse the mirror sync direction (closes: #947796)
24
        adduser --system --quiet --disabled-login --shell /usr/bin/rssh --no-create-home --home ${MASTER_ROOT} --gecos 'Libravatar Mirror Master,,,' libravatar-master || true
443 by Francois Marier
Create a new libravatar-master package
25
26
        mkdir -p ${MASTER_ROOT}/.ssh/
782.1.1 by Francois Marier
Reverse the mirror sync direction (closes: #947796)
27
        touch ${MASTER_ROOT}/.ssh/authorized_keys
28
        chown libravatar-master ${MASTER_ROOT}/.ssh/authorized_keys
443 by Francois Marier
Create a new libravatar-master package
29
    ;;
30
31
    abort-upgrade|abort-remove|abort-deconfigure)
32
    ;;
33
34
    *)
35
        echo "postinst called with unknown argument \`$1'" >&2
36
        exit 1
37
    ;;
38
esac
39
40
# dh_installdeb will replace this with shell code automatically
41
# generated by other debhelper scripts.
42
43
#DEBHELPER#
44
45
exit 0