gmyth-stream/server/0.3/debian/gms.postinst
author morphbr
Wed Aug 29 14:29:24 2007 +0100 (2007-08-29)
branchtrunk
changeset 831 e2baa6947dbf
permissions -rw-r--r--
[svn r837] - Deleted old code
- Bug fix on gmencoder by Renato Filho
- Restored Renato's version of monitor_handler to work with gmencoder
     1 #! /bin/sh
     2 # postinst script for gms
     3 
     4 set -e
     5 
     6 case "$1" in
     7   configure)
     8     if ! getent passwd gms >/dev/null; then
     9       adduser --disabled-password  --quiet --system \
    10         --home /var/gms-media \
    11         --gecos "GMS media dir" --group gms
    12     fi
    13     if ! getent passwd gms | grep -q /var/run/gms; then
    14         usermod -d /var/gms-media gms
    15     fi
    16     update-rc.d gmsd defaults
    17     invoke-rc.d gmsd start
    18   ;;
    19   abort-upgrade|abort-remove|abort-deconfigure)
    20   ;;
    21   *)
    22     echo "postinst called with unknown argument \`$1'" >&2
    23     exit 1
    24   ;;
    25 esac
    26 
    27 #DEBHELPER#
    28 
    29 exit 0