#!/bin/sh

set -e

# Reload the launcher binary from disk while preserving the current state
# on upgrade (except when installing or upgrading from an old version).
if [ "$1" = configure ] && [ -x "/etc/init.d/maemo-launcher" ]; then
	if dpkg --compare-versions "$2" lt-nl 0.27-1; then
		action=start
	else
		action=reload
	fi

	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d maemo-launcher $action || exit $?
	else
		/etc/init.d/maemo-launcher $action || exit $?
	fi
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/maemo-launcher" ]; then
	update-rc.d maemo-launcher start 45 2 3 4 . stop 45 0 1 5 6 . >/dev/null || exit $?
fi
# End automatically added section


exit 0

