debian/postinst
branchdebian
changeset 116 d99f3169828a
parent 97 7953788881a4
child 224 caf9cb61f856
--- a/debian/postinst	Tue Oct 13 15:30:03 2009 +0100
+++ b/debian/postinst	Tue Oct 13 18:21:22 2009 +0100
@@ -20,6 +20,13 @@
 
 case "$1" in
     configure)
+        if ! getent passwd hg >/dev/null; then
+            adduser --disabled-password --quiet --system \
+                --shell /bin/sh --group \
+                --home /var/lib/mercurial-server \
+                --gecos "Mercurial repositories" hg
+            su -c "/usr/share/mercurial-server/init/hginit /usr/share/mercurial-server" hg
+        fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)