]> err.no Git - varnish/commitdiff
Added creation of varnish user and group to postinst
authorbahner <bahner@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 20 Aug 2007 08:55:34 +0000 (08:55 +0000)
committerbahner <bahner@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 20 Aug 2007 08:55:34 +0000 (08:55 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1867 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/debian/varnish.postinst [new file with mode: 0644]

diff --git a/varnish-cache/debian/varnish.postinst b/varnish-cache/debian/varnish.postinst
new file mode 100644 (file)
index 0000000..dab4e68
--- /dev/null
@@ -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
+}
+
+