Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (47 sloc) 1.452 kB
#! /bin/sh
# Source debconf library
. /usr/share/debconf/confmodule
# Get interchange user and group
db_get interchange/user
USER=$RET
db_get interchange/group
GROUP=$RET
# Creating interchange group if he isn't already there
if ! grep -q ^$GROUP: /etc/group; then
echo Adding system group: $GROUP.
addgroup $GROUP
fi
# Creating interchange user if he isn't already there
if ! grep -q ^$USER: /etc/passwd; then
echo Adding system user: $USER.
adduser --system --ingroup $GROUP --home /usr/lib/interchange $USER
fi
# Ensure correct permissions for directories with log files resp. PID file
chown -R $USER.$GROUP /var/log/interchange
chmod 770 /var/log/interchange
chown -R $USER.$GROUP /var/run/interchange
chown -R $USER.$GROUP /usr/lib/cgi-bin/ic
chmod u+s /usr/lib/cgi-bin/ic/*
# Make makecat.cfg accessible for the interchange user
chown $USER.$GROUP /etc/interchange/makecat.cfg
# Record debconf configuration in a file
INITCFG=/etc/interchange/init.cfg
cat > $INITCFG <<EOF
# This file is automatically generated !
#
# YOU MAY MODIFY THIS FILE
# But we recommend to use dpkg-reconfigure interchange instead.
EOF
db_get interchange/mode
case "$RET" in
"unix mode") MODE=--unix;;
"internet mode") MODE=--inetmode;;
"both") MODE="";;
esac
echo MODE=$MODE >> $INITCFG
echo USER=$USER >> $INITCFG
echo GROUP=$GROUP >> $INITCFG
#DEBHELPER#
# Don't wait on Interchange to close file handles
db_stop
exit 0
Jump to Line
Something went wrong with that request. Please try again.