From b79e5c9fa899514501df13868717641987750fac Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 30 Mar 2011 03:01:15 +0000 Subject: added postinst and postrm (user handling) diff --git a/rhnop-server/debian/control b/rhnop-server/debian/control index 25892dd..eafbd92 100644 --- a/rhnop-server/debian/control +++ b/rhnop-server/debian/control @@ -8,7 +8,7 @@ Homepage: http://www.helsinki.at/ Package: rhnop-server Architecture: any -Depends: ${shlibs:Depends}, liblua5.1-mq, liblua5.1-socket2, liblua5.1-sql-mysql-2 +Depends: ${shlibs:Depends}, adduser, liblua5.1-mq, liblua5.1-socket2, liblua5.1-sql-mysql-2 Description: Radio Helsinki now playing information system - server The Radio Helsinki now playing information system gathers the now playing info into an mysql database for further processing. diff --git a/rhnop-server/debian/postinst b/rhnop-server/debian/postinst new file mode 100755 index 0000000..b3b5815 --- /dev/null +++ b/rhnop-server/debian/postinst @@ -0,0 +1,9 @@ +#!/bin/sh +# postinst script for rhnop-server + +set -e + +if [ "$1" = "configure" ]; then + adduser --quiet --system --group --no-create-home --home /var/run/rhnop rhnop + chown rhnop /etc/rhnop/nopsyncd.conf +fi diff --git a/rhnop-server/debian/postrm b/rhnop-server/debian/postrm new file mode 100755 index 0000000..18cb882 --- /dev/null +++ b/rhnop-server/debian/postrm @@ -0,0 +1,13 @@ +#!/bin/sh +# postrm script for rhnop-server + +set -e + +if [ "$1" = "purge" ] ; then + if [ -x "$(command -v deluser)" -a -x "$(command -v delgroup)" ]; then + deluser --quiet --system rhnop || true + delgroup --quiet --system rhnop || true + else + echo "Not removing rhnop user and group: adduser package not found." >&2 + fi +fi -- cgit v0.10.2