File: postinst

package info (click to toggle)
pdnsd 1.1.11par-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,416 kB
  • ctags: 1,102
  • sloc: ansic: 10,567; sh: 707; perl: 185; makefile: 158
file content (23 lines) | stat: -rw-r--r-- 559 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e

id pdnsd > /dev/null 2>&1 || adduser --system --ingroup proxy --home /var/cache/pdnsd --gecos pdnsd pdnsd || true

if [ "$1" = "configure" -a -n "$2" ] && dpkg --compare-versions "$2" lt "1.1" ; then
  if [ -f /var/cache/pdnsd/pdnsd.cache ]; then
    echo -n "Deleting old pdnsd cache... "
    rm -f /var/cache/pdnsd/pdnsd.cache
    echo "done."
  fi
fi

if [ ! -f /var/cache/pdnsd/pdnsd.cache ];then
	dd if=/dev/zero of=/var/cache/pdnsd/pdnsd.cache bs=1 count=4 2> /dev/null
fi

chown -R pdnsd:proxy /var/cache/pdnsd

sleep 2

#DEBHELPER#