view debian/postinst @ 0:1d874ce53afb

Start a Debian package From Jessie.
author Louis Opter <kalessin@kalessin.fr>
date Thu, 05 Nov 2015 07:36:03 +0000
parents
children 079d74ea929a
line wrap: on
line source

#!/bin/sh
# postinst script for lightsd
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <postinst> `abort-remove'
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
    configure)
        getent group lightsd >/dev/null || groupadd -r lightsd
        getent passwd lightsd >/dev/null || useradd -r -d / -g lightsd lightsd

        cat << 'EOF'

lightsd runs under the `lightsd' user and group by default; add yourself to
this group to be able to open lightsd's socket and pipe under /var/run/lightsd:

  gpasswd -a $USER lightsd

Re-open your current desktop or ssh session for the change to take effect.
Then use systemctl to start lightsd; you can start playing with lightsd with:

  `lightsd --prefix`/share/doc/lightsd/examples/lightsc.py

EOF
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

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

#DEBHELPER#

exit 0