chiark / gitweb /
configure.ac, debian/: Overhaul Wireshark plugin build machinery.
[tripe] / debian / tripe.postinst
... / ...
CommitLineData
1#! /bin/sh
2
3set -e
4
5## Make sure that /dev/net/tun exists. Don't do anything special if devfs or
6## udev is running.
7if [ ! -c /dev/.devfsd ] &&
8 [ ! -d /dev/.udev ] &&
9 [ ! -c /dev/net/tun ]
10then
11 echo "/dev/net/tun not present: invoking MAKEDEV to create it."
12 (cd /dev && /sbin/MAKEDEV tun)
13fi
14
15## Make sure that the `tripe' user and group exist.
16getent group tripe >/dev/null ||
17 addgroup --system tripe
18getent passwd tripe >/dev/null || \
19 adduser --system \
20 --ingroup tripe \
21 --home /etc/tripe \
22 --gecos "TrIPE server" \
23 tripe
24
25## Create the log directory and an initial logfile.
26if [ ! -d /var/log/tripe ]; then
27 mkdir -m2750 /var/log/tripe
28 chown tripe:adm /var/log/tripe
29fi
30if [ ! -f /var/log/tripe/tripe.log ]; then
31 (umask 027; touch /var/log/tripe/tripe.log)
32 chown tripe:adm /var/log/tripe/tripe.log
33fi
34
35#DEBHELPER#