chiark / gitweb /
svc/tripe-ifup.in: Trim prefix length from IPv6 address used as gateway.
[tripe] / debian / tripe.postinst
CommitLineData
ef4a1ab7 1#! /bin/sh
2
3set -e
4
a5c4dd60
MW
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."
ef4a1ab7 12 (cd /dev && /sbin/MAKEDEV tun)
13fi
14
a5c4dd60
MW
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
1a372224
MW
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
ef4a1ab7 35#DEBHELPER#