postinst is in mrs 6.0.5+dfsg-3ubuntu1.
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 | #!/bin/sh
set -e
MRSUSER=mrs-dba
DATADIR=/var/lib/mrs
case "$1" in
configure)
if ! getent passwd $MRSUSER > /dev/null ; then
echo "Creating $MRSUSER user..."
adduser --system --group --quiet --home $DATADIR \
--no-create-home --disabled-login --force-badname $MRSUSER
fi
# creating directories, should also set permissions
install -d -o$MRSUSER -g$MRSUSER -m775 $DATADIR
install -d -o$MRSUSER -g$MRSUSER -m775 $DATADIR/blast-cache
install -d -o$MRSUSER -g$MRSUSER -m775 $DATADIR/mrs
install -d -o$MRSUSER -g$MRSUSER -m775 $DATADIR/raw
install -d -o$MRSUSER -g$MRSUSER -m775 /var/log/mrs
if [ -x "/etc/init.d/mrs" ]; then
update-rc.d mrs defaults >/dev/null
fi
;;
esac
|