gmyth-stream/server/debian/gms.postinst
branchtrunk
changeset 901 d6ec9a68363e
parent 815 7f290a3a34b1
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gmyth-stream/server/debian/gms.postinst	Thu Jan 31 13:19:29 2008 +0000
     1.3 @@ -0,0 +1,29 @@
     1.4 +#! /bin/sh
     1.5 +# postinst script for gms
     1.6 +
     1.7 +set -e
     1.8 +
     1.9 +case "$1" in
    1.10 +  configure)
    1.11 +    if ! getent passwd gms >/dev/null; then
    1.12 +      adduser --disabled-password  --quiet --system \
    1.13 +        --home /var/gms-media \
    1.14 +        --gecos "GMS media dir" --group gms
    1.15 +    fi
    1.16 +    if ! getent passwd gms | grep -q /var/run/gms; then
    1.17 +        usermod -d /var/gms-media gms
    1.18 +    fi
    1.19 +    update-rc.d gmsd defaults
    1.20 +    invoke-rc.d gmsd start
    1.21 +  ;;
    1.22 +  abort-upgrade|abort-remove|abort-deconfigure)
    1.23 +  ;;
    1.24 +  *)
    1.25 +    echo "postinst called with unknown argument \`$1'" >&2
    1.26 +    exit 1
    1.27 +  ;;
    1.28 +esac
    1.29 +
    1.30 +#DEBHELPER#
    1.31 +
    1.32 +exit 0