File: bip.postinst

package info (click to toggle)
bip 0.8.2-1squeeze4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 956 kB
  • ctags: 819
  • sloc: ansic: 8,752; perl: 1,424; sh: 1,311; yacc: 192; lex: 124; makefile: 33
file content (27 lines) | stat: -rw-r--r-- 517 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

set -e

BIPUSER=bip
BIPGROUP=bip
BIPHOME=/var/lib/bip

chgrp "$BIPUSER" "$BIPHOME" 2>/dev/null || addgroup --system "$BIPUSER"
chown "$BIPUSER"."$BIPGROUP" "$BIPHOME" 2>/dev/null || \
	adduser --system --home "$BIPHOME" --disabled-password \
	--ingroup "$BIPGROUP" "$BIPUSER"

if [ ! -e /var/log/bip ]
then
	mkdir /var/log/bip
	chown bip:bip /var/log/bip
	chmod 750 /var/log/bip
fi

if [ "$1" = "configure" -a "$2" = "" ]
then
	chown root:"$BIPGROUP" /etc/bip.conf
	chmod 640 /etc/bip.conf
fi

#DEBHELPER#