POSTIN
/bin/sh
if [ "$1" = 0 ]; then
SECRET=`dd if=/dev/urandom bs=1 count=42 2>/dev/null | od -a -w42 | cut -c8- | sed -e 's![^[:alnum:]]!!g' | xargs`
if [ -n "$SECRET" ] ; then
echo "Updating authentication secret in config files..."
sed -i -e 's#\"KEY\"#\"$SECRET\"#g' /home/services/httpd/html/hastymail/.htaccess
else
echo "Remember to update secret in "
echo " /home/services/httpd/html/hastymail/.htaccess"
fi
fi
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/httpd ] && . /etc/sysconfig/httpd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/httpd ]; then
/sbin/service httpd restart 1>&2 || :;
fi
fi };