#! /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 #DEBHELPER#