From 2b82f07726d657dff4ad091f056b8685d5ba9930 Mon Sep 17 00:00:00 2001 From: Sudheer K Date: Sun, 8 Jan 2012 00:05:08 -0800 Subject: [PATCH] Adding new postinst --- qtc_packaging/debian_harmattan/postinst | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 qtc_packaging/debian_harmattan/postinst diff --git a/qtc_packaging/debian_harmattan/postinst b/qtc_packaging/debian_harmattan/postinst new file mode 100644 index 0000000..f19e3a5 --- /dev/null +++ b/qtc_packaging/debian_harmattan/postinst @@ -0,0 +1,57 @@ +#!/bin/sh +# postinst script for vicar +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + + # Kill any running instances of the daemon (only used on Linux based systems) + killall -q vicar-daemon || true + killall -q vicar-telepathy || true + + #echo "Starting Vicar daemon ..." + #[[ -x /opt/vicar/bin/vicar-daemon ]] && /opt/vicar/bin/vicar-daemon& + + #echo "Starting Vicar-Telepathy ..." + #[[ -x /opt/vicar/bin/vicar-telepathy ]] && /opt/vicar/bin/vicar-telepathy& + + echo "Creating Vicar Telepathy account ..." + [[ -x /opt/vicar/bin/vicar-utils ]] && /opt/vicar/bin/vicar-utils INSTALL + + echo "Creating Vicar Harmattan account ..." + [[ -x /opt/vicar/bin/vicar-utils ]] && /opt/vicar/bin/vicar-utils --create-account + ;; + + 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 + + -- 1.7.9.5