Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 9a7654ad916d00c94018404c658d7ff1 > scriptlet

hastymail-1.5-1.amd64.rpm

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 };