view debian/postinst @ 19:079d74ea929a

New upstream release 1.2.1-rc.2
author buildbot@srv-seaquake.kalessin.fr
date Sun, 12 Feb 2017 22:31:10 +0000
parents 1d874ce53afb
children 9e55f955c301
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