summaryrefslogtreecommitdiff
path: root/debian/dbus.postinst
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@debian.org>2005-08-23 14:17:21 +0000
committerSjoerd Simons <sjoerd@debian.org>2005-08-23 14:17:21 +0000
commit2fc5fc622b27ad3de6749f79cd460eb491192d5b (patch)
tree185ada93c1362f9f3c1d038bc76abb394ec44c2f /debian/dbus.postinst
parent982129c400c54b3da2c12d2354767752b5b8e470 (diff)
downloaddbus-2fc5fc622b27ad3de6749f79cd460eb491192d5b.tar.gz
Import dbus's experimental package
git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/experimental/dbus@276 ceb527fc-18e6-0310-9fe2-813c157c29e7
Diffstat (limited to 'debian/dbus.postinst')
-rw-r--r--debian/dbus.postinst21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/dbus.postinst b/debian/dbus.postinst
new file mode 100644
index 00000000..3b075ead
--- /dev/null
+++ b/debian/dbus.postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+# -*- coding: utf-8 -*-
+# Post-installation script for D-BUS
+# Copyright © 2003 Colin Walters <walters@debian.org>
+
+MESSAGEUSER=messagebus
+MESSAGEHOME=/var/run/dbus
+
+chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup --system "$MESSAGEUSER"
+chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
+ adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
+
+if [ -x "/etc/init.d/dbus" ] && [ "$1" = "configure" ] && [ "x$2" != "x" ]; then
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ /usr/sbin/invoke-rc.d dbus stop
+ else
+ /etc/init.d/dbus stop
+ fi
+fi
+
+#DEBHELPER#