From 5550f37fe06ad739876ee76fe760e3d61457e4ec Mon Sep 17 00:00:00 2001 From: William King Date: Wed, 17 Jun 2015 15:46:07 -0700 Subject: [PATCH] FS-7669 #resolve now if you don't have the /etc/freeswitch directory, we will install the default packages for you. If you already have this directory, we'll let you deal with your own configs. --- debian/postinst | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 debian/postinst diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000000..783f30bb68 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# postinst script for thing +# +# 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) + if [ ! -d "/etc/freeswitch" ]; then + mkdir -p /etc/freeswitch/ + cp -a /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/ + fi + ;; + + 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