postinst is in gwtp 6.05.1-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #! /bin/sh
# postinst script for gwtp
#
# see: dh_installdeb(1)
set -e
if [ "$1" = "configure" ]; then
LOGFILE=/var/log/gwtp.log
GROUP=geneweb
# Thus all files created there will have www-data as group
# Otherwise, the CGI could not write them
if [ ! -f $LOGFILE ]
then
touch $LOGFILE
fi
chown root:$GROUP $LOGFILE
chmod 660 $LOGFILE
# Preserve privacy of passwd file
PASSWD=/etc/geneweb/gwtp/passwd
if [ -f $PASSWD ]
then
touch $PASSWD
fi
chown root:$GROUP $PASSWD
chmod 640 $PASSWD
# The program gwtp has to be setgid
# so that it may write in /var/lib/geneweb
if [ -f /usr/lib/geneweb/gwtp ]
then
chgrp geneweb /usr/lib/geneweb/gwtp
chmod 2755 /usr/lib/geneweb/gwtp
fi
# The directory for the token file of gwtp
if [ -d /var/run/gwtp ]
then
chgrp geneweb /var/run/gwtp
chmod 770 /var/run/gwtp
fi
fi
|