Welcome to mirror list, hosted at ThFree Co, Russian Federation.

univention-bareos.postinst.in « debian - github.com/bareos/bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2361546b8a502dc55d6de09efa9839b45694044c (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
# source debconf stuff
. /usr/share/debconf/confmodule
. /usr/share/univention-lib/all.sh

exec 3>/dev/null

# ... rest of your code ...
if [ "$1" = "configure" ]; then

    # on upgrade, set backup_myself to yes if it was not set
    filestorage=$(ucr get bareos/filestorage)
    backup_myself=$(ucr get bareos/backup_myself)
    if [ -n "$filestorage" -a -z "$backup_myself" ]; then
        ucr set bareos/backup_myself=yes
    fi

    # set defaults
    ucr set \
            bareos/filestorage?/var/lib/bareos/storage \
            bareos/max_full_volume_bytes?20 \
            bareos/max_full_volumes?1 \
            bareos/max_diff_volume_bytes?10 \
            bareos/max_diff_volumes?1 \
            bareos/max_incr_volume_bytes?1 \
            bareos/max_incr_volumes?1 \
            bareos/backup_myself?no \
            bareos/webui/console/user1/username?Administrator \
            bareos/webui/console/user1/password?

    # commit defaults
    ucr commit \
            /etc/bareos/bconsole.conf
            #/etc/bareos/bareos-dir.conf \
            #/etc/bareos/bareos-sd.conf \
            #/etc/bareos/bareos-fd.conf \

    touch /etc/bareos/autogenerated/clients.include

    # activate our listener plugin
    invoke-rc.d univention-directory-listener restart

    # restart bareos
    invoke-rc.d bareos-dir restart
    invoke-rc.d bareos-sd restart
    invoke-rc.d bareos-fd restart

    [ -x "/etc/init.d/univention-firewall" ] && invoke-rc.d univention-firewall restart

    # reload apache
    invoke-rc.d apache2 reload

    call_joinscript 62univention-bareos.inst
fi

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0