#!/bin/sh -e # postinst script for cereal # Author: Jameson Graef Rollins and # Daniel Kahn Gillmor # (c) 2007 if ! getent passwd cereal >/dev/null ; then echo "adding cereal user..." adduser --quiet --system --no-create-home --home '/var/lib/cereal' --shell '/bin/false' --gecos 'cereal logfile owner,,,' cereal fi # apply some needed upgrades to existing sessions for session in $(cereal list | cut -d ' ' -f 2) ; do # add the 'down' file to all stopped sessions if cereal list "$session" | grep -q '^-' ; then touch /var/lib/cereal/sessions/"$session"/down fi # make sure all sessions have the finish script # added for version 0.22 ln -sf /usr/share/cereal/finish /var/lib/cereal/sessions/"$session"/finish done # restart all running sessions cereal-admin restart --running # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. exit 0