"Fossies" - the Fresh Open Source Software Archive

Member "rgdbm-2.1.42/debian/postinst.server" (26 Jun 2007, 1137 Bytes) of package /linux/privat/old/rgdbm-2.1.42.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #! /bin/sh
    2 
    3 set -e
    4 
    5 STATDIR=${STATDIR-/var/lib/gdbm}
    6 
    7 case "$1" in
    8   configure|abort-upgrade|abort-remove|abort-deconfigure)
    9 
   10     # adding gdbm group and user
   11     #
   12     addgroup --system gdbm >/dev/null 2>&1
   13     adduser --system --home ${STATDIR} --shell /bin/false --ingroup gdbm --disabled-login gdbm >/dev/null 2>&1 
   14 
   15     # adding server subdirectories (home was already made above)
   16     #
   17     mkdir -p ${STATDIR}/data
   18     mkdir -p ${STATDIR}/ctrl
   19     mkdir -p ${STATDIR}/certs
   20 
   21     if [ "$1" = "configure" ]; then
   22 
   23       # stopping daemon
   24       #
   25       if [ -f /etc/init.d/gdbmd -a -n "$2" ]; then
   26         set +e
   27         if [ -x /usr/sbin/invoke-rc.d ]; then
   28           invoke-rc.d gdbmd stop
   29         else
   30           sh /etc/init.d/gdbmd stop
   31         fi
   32         set -e
   33       fi
   34 
   35       # setting sysv links
   36       #
   37       update-rc.d gdbmd defaults 20 80 >/dev/null
   38 
   39       # restarting daemon
   40       #
   41       if [ -f /etc/init.d/gdbmd ]; then
   42         set +e
   43         if [ -x /usr/sbin/invoke-rc.d ]; then
   44           invoke-rc.d gdbmd start
   45         else
   46           sh /etc/init.d/gdbmd start
   47         fi
   48         set -e
   49       fi
   50     fi
   51   ;;
   52 esac