source: debian/gutenbach-server.postinst @ ee42199

debianmacno-cupsweb
Last change on this file since ee42199 was 30beeab, checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago

Remove "gutenbach-" from directory names and rename "gutenbach" to "gutenbach-server"

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[10c2c36]1#!/bin/sh
[30beeab]2# postinst script for gutenbach-server
[10c2c36]3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9#        * <postinst> `configure' <most-recently-configured-version>
10#        * <old-postinst> `abort-upgrade' <new version>
11#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12#          <new-version>
13#        * <postinst> `abort-remove'
14#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15#          <failed-install-package> <version> `removing'
16#          <conflicting-package> <version>
17# for details, see http://www.debian.org/doc/debian-policy/ or
18# the debian-policy package
19
[331360d]20. /usr/share/debconf/confmodule
[10c2c36]21
22case "$1" in
[331360d]23    configure|reconfigure)
[e4cb270]24        if [ ! -d /usr/lib/gutenbach/config ]; then
25            mkdir /usr/lib/gutenbach/config
26        fi
27
[30beeab]28        db_get gutenbach-server/zephyrclass
[e4cb270]29        echo "$RET" > /usr/lib/gutenbach/config/zephyrclass
[30beeab]30        db_get gutenbach-server/printername
[e4cb270]31        echo "$RET" > /usr/lib/gutenbach/config/printername
[30beeab]32        db_get gutenbach-server/hostname
[e4cb270]33        echo "$RET" > /usr/lib/gutenbach/config/hostname
34
[c631d1a]35        chmod +x /usr/lib/gutenbach/inst/create-filter-config
[c503858]36        chmod +x /usr/lib/gutenbach/inst/cups-add-printer
37        chmod +x /usr/lib/gutenbach/inst/cups-set-perms
[c631d1a]38        /usr/lib/gutenbach/inst/create-filter-config
[c503858]39        /usr/lib/gutenbach/inst/cups-add-printer
40        /usr/lib/gutenbach/inst/cups-set-perms
41
[2babe17]42
[e20354c]43        inaudio=$(groups lp | grep audio || true)
[331360d]44        if [ -z "$inaudio" ]; then
[e20354c]45            adduser lp audio
[331360d]46        fi
47
48        db_stop
[10c2c36]49    ;;
50
51    abort-upgrade|abort-remove|abort-deconfigure)
52    ;;
53
54    *)
55        echo "postinst called with unknown argument \`$1'" >&2
56        exit 1
57    ;;
58esac
59
60# dh_installdeb will replace this with shell code automatically
61# generated by other debhelper scripts.
62
63#DEBHELPER#
64
65exit 0
Note: See TracBrowser for help on using the repository browser.