From c35351510ccd0e99ac6cc8a0bb9384d24acc5571 Mon Sep 17 00:00:00 2001 From: thlo Date: Fri, 25 Apr 2014 16:57:31 +0200 Subject: Debianize Plugin. --- debian/postinst | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 debian/postinst (limited to 'debian/postinst') diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..7ed6d39 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,51 @@ +#!/bin/sh +# postinst script for vdr-plugin-smarttvweb +# +# 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) + + # Create a log file, writable by the plugin + logfile=/var/log/smarttvweb/smarttvweb.log + if [ ! -f $logfile ]; then + touch $logfile + chmod 664 $logfile + chown -R root:vdr $(dirname $logfile) + fi + + # Set ownership of web directory + chown -R vdr:vdr /var/lib/vdr/plugins/smarttvweb + + ;; + + 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 -- cgit v1.2.3