From 2b846868f4d5e517b6add61e519d3dfc6d8aa0ed Mon Sep 17 00:00:00 2001 From: bahner Date: Mon, 20 Aug 2007 08:55:34 +0000 Subject: [PATCH] Added creation of varnish user and group to postinst git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1867 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/debian/varnish.postinst | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 varnish-cache/debian/varnish.postinst diff --git a/varnish-cache/debian/varnish.postinst b/varnish-cache/debian/varnish.postinst new file mode 100644 index 00000000..dab4e68f --- /dev/null +++ b/varnish-cache/debian/varnish.postinst @@ -0,0 +1,28 @@ +# Automatically added by dh_installinit +if [ -x "/etc/init.d/varnish" ]; then + update-rc.d varnish defaults >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d varnish start || exit $? + else + /etc/init.d/varnish start || exit $? + fi +fi +# End automatically added section +# Automatically added by dh_installinit +if [ -x "/etc/init.d/varnishlog" ]; then + update-rc.d varnishlog defaults >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d varnishlog start || exit $? + else + /etc/init.d/varnishlog start || exit $? + fi +fi +# End automatically added section + +varnish_setup_user() { + if ! id varnish > /dev/null 2>&1 ; then + adduser --system --no-create-home varnish 2>&1 > /dev/null || exit 78 + fi +} + + -- 2.39.5