Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > 0acd615780aa0e1a4416ecf7ead30156 > scriptlet

courier-imap-pop3-4.1.1-4.amd64.rpm

PREUN

/bin/sh
if [ "$1" = "0" ]; then
	{
if [ -f /var/lock/subsys/courier-pop3 ]; then
/sbin/service courier-pop3 stop 1>&2 || :;
fi };	/sbin/chkconfig --del courier-pop3
	{
if [ -f /var/lock/subsys/courier-pop3-ssl ]; then
/sbin/service courier-pop3-ssl stop 1>&2 || :;
fi };	/sbin/chkconfig --del courier-pop3-ssl
fi

POSTIN

/bin/sh
/sbin/chkconfig --add courier-pop3
/sbin/chkconfig --add courier-pop3-ssl
/sbin/chkconfig --del courier-imap-pop3 >/dev/null 2>&1 || :
if [ -f /var/lock/subsys/courier-imap-pop3 ]; then
	/sbin/service courier-imap-pop3 stop >&2
	/sbin/service courier-pop3 start >&2
else
	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/courier-pop3 ] && . /etc/sysconfig/courier-pop3
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/courier-pop3 ]; then
/sbin/service courier-pop3 restart 1>&2 || :;
else
echo 'Run "/sbin/service courier-pop3 start" to start courier-pop3 daemon.'
fi
fi };fi
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/courier-pop3-ssl ] && . /etc/sysconfig/courier-pop3-ssl
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/courier-pop3-ssl ]; then
/sbin/service courier-pop3-ssl restart 1>&2 || :;
else
echo 'Run "/sbin/service courier-pop3-ssl start" to start courier-pop3-ssl daemon.'
fi
fi };

Triggers

courier-imap-pop3 < 3.0.5

/bin/sh
if [ -f /var/lib/openssl/certs/pop3d.pem ]; then
	echo
	echo pop3d.pem has been moved automatically to /etc/courier-imap/certs
	echo
	mv -f /var/lib/openssl/certs/pop3d.pem /etc/courier-imap/certs
fi
if [ -f /etc/sysconfig/courier-pop3 ]; then
	. /etc/sysconfig/courier-pop3
	for opt in `grep ^[^#] /etc/sysconfig/courier-pop3 |grep -v TLS_CERTFILE |grep -v MAILDIR |grep -v COURIERTLS |cut -d= -f1`;
	do
		eval opt2=\$$opt
		sed -i s/^$opt=.*/"$opt=\"$opt2\""/ /etc/courier-imap/pop3d
		sed -i s/^$opt=.*/"$opt=\"$opt2\""/ /etc/courier-imap/pop3d-ssl
	done
	sed -i s!^MAILDIRPATH=.*!"MAILDIRPATH=\"$MAILDIR\""! /etc/courier-imap/pop3d-ssl
	sed -i s!^MAILDIRPATH=.*!"MAILDIRPATH=\"$MAILDIR\""! /etc/courier-imap/pop3d
	echo
	echo POP3D config file has been rewriten to /etc/courier-imap/{pop3d,pop3d-ssl}
	echo please look at them
	echo
fi
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/courier-pop3 ] && . /etc/sysconfig/courier-pop3
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/courier-pop3 ]; then
/sbin/service courier-pop3 restart 1>&2 || :;
else
echo 'Run "/sbin/service courier-pop3 start" to start courier-pop3 service.'
fi
fi };

courier-imap-pop3 < 3.0.6

/bin/sh
. /etc/courier-imap/pop3d-ssl
if [ $TLS_CACHEFILE = "/var/couriersslcache" ]; then
	sed -i s/^TLS_CACHEFILE=.*/"TLS_CACHEFILE=\/var\/spool\/courier-imap\/couriersslcache"/ /etc/courier-imap/pop3d-ssl
fi