[SCM] Debian packaging of Pinto CPAN distribution branch, master, updated. 80fbfc94ab23430843ec5491886bb442040c833c

Oleg Gashev oleg at gashev.net
Sat Jun 1 20:54:44 UTC 2013


The following commit has been merged in the master branch:
commit 80fbfc94ab23430843ec5491886bb442040c833c
Author: Oleg Gashev <oleg at gashev.net>
Date:   Sat Jun 1 20:53:12 2013 +0000

    Added postinst script.

diff --git a/debian/pinto.postinst b/debian/pinto.postinst
new file mode 100644
index 0000000..9d4361d
--- /dev/null
+++ b/debian/pinto.postinst
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ "$1" = configure ]; then
+    lastversion="$2";
+
+    getent group pinto >/dev/null 2>&1 || addgroup --system pinto
+    getent passwd pinto >/dev/null 2>&1 ||
+	adduser --system --home /var/pinto --no-create-home \
+		--disabled-password --ingroup pinto pinto
+
+    mkdir -p /var/pinto
+    chown root:pinto /var/pinto
+    chmod 0775 /var/pinto
+
+    mkdir -p /var/run/pinto
+    chown root:pinto /var/run/pinto
+    chmod 0775 /var/run/pinto
+
+    mkdir -p /var/log/pinto
+    chown pinto:adm /var/log/pinto
+    chmod 0750 /var/log/pinto
+
+    touch /var/log/pinto/access.log /var/log/pinto/error.log
+    chown pinto:adm /var/log/pinto/access.log /var/log/pinto/error.log
+    chmod 0640 /var/log/pinto/access.log /var/log/pinto/error.log
+
+    if /bin/pidof /usr/bin/pintod >/dev/null 2>&1; then
+	invoke-rc.d pinto restart
+    else
+    	invoke-rc.d pinto start
+    fi
+fi
+
+db_stop
+

-- 
Debian packaging of Pinto CPAN distribution



More information about the Pkg-perl-cvs-commits mailing list