From 07b255f5e0ef2ad6fe2573432f68b2b0310a1dbb Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 19 May 2014 20:49:21 -0400 Subject: [PATCH] Include systemd service and schema file * Include systemd service and schema file * Create trustrouter user on install --- debian/changelog | 7 ++++++ debian/control | 2 +- debian/moonshot-trust-router.install | 2 ++ debian/moonshot-trust-router.postinst | 40 +++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 debian/moonshot-trust-router.postinst diff --git a/debian/changelog b/debian/changelog index e5f0bbd..e03ce99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +moonshot-trust-router (1.2-2) unstable; urgency=medium + + * Include systemd service and schema file + * Create trustrouter user on install + + -- Sam Hartman Mon, 19 May 2014 20:48:12 -0400 + moonshot-trust-router (1.2-1) unstable; urgency=low * New upstream version. diff --git a/debian/control b/debian/control index 1e517b4..a504f38 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Vcs-Git: git://git.project-moonshot.org/trust_router.git Package: moonshot-trust-router Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, moonshot-gss-eap +Depends: ${shlibs:Depends}, ${misc:Depends}, moonshot-gss-eap, adduser Description: Moonshot Trust Router This package is under construction diff --git a/debian/moonshot-trust-router.install b/debian/moonshot-trust-router.install index defbefe..1c8eb23 100644 --- a/debian/moonshot-trust-router.install +++ b/debian/moonshot-trust-router.install @@ -1,2 +1,4 @@ usr/bin/* +usr/share/trust_router/* +lib/systemd/system/* diff --git a/debian/moonshot-trust-router.postinst b/debian/moonshot-trust-router.postinst new file mode 100644 index 0000000..49da91e --- /dev/null +++ b/debian/moonshot-trust-router.postinst @@ -0,0 +1,40 @@ +#!/bin/sh + +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 dpkg --compare-versions "$2" lt 1.2-2; then + adduser --system --home /var/lib/trust_router --group --disable-login trustrouter + 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 -- 2.1.4