Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release > by-pkgid > 55ecbdbde8fce360ae602cdca0688233 > scriptlet

tenshi-0.11-0.2mdv2010.0.i586.rpm

PREIN

/bin/sh
/usr/share/rpm-helper/add-user tenshi $1 tenshi /dev/null /sbin/nologin

PREUN

/bin/sh
/usr/share/rpm-helper/del-service tenshi $1 tenshi 
/usr/share/rpm-helper/del-syslog tenshi $1

POSTIN

/bin/sh
/usr/share/rpm-helper/add-service tenshi $1 tenshi 
if [ ! -n "`grep '/var/log/tenshi.fifo' /etc/security/msec/perms.conf`" ] ; then
	echo "/var/log/tenshi.fifo	current.tenshi 640" >> \
		/etc/security/msec/perms.conf
fi

if [ ! -n "`grep '# BEGIN: Automatically added by tenshi installation' /etc/syslog-ng.conf`" ] ; then
cat << EOF >> /etc/syslog-ng.conf
# BEGIN: Automatically added by tenshi installation
destination d_tenshi {
	pipe("/var/log/tenshi.fifo"
	group(tenshi)
	perm(0640)
	);
};
filter f_level_tenshi { level(debug..emerg); };
log { source(s_sys); filter(f_level_tenshi); destination(d_tenshi); };
# END
EOF

elif [ ! -n "`grep '# BEGIN: Automatically added by tenshi installation' /etc/syslog.conf`" ] ; then
cat << EOF >> /etc/syslog.conf
# BEGIN: Automatically added by tenshi installation
*.*					-/var/log/tenshi.fifo
# END
EOF

else
	echo "Not found the syslog daemon's config file."
	echo "Please setup with your hand."
fi

POSTUN

/bin/sh
/usr/share/rpm-helper/del-user tenshi $1 tenshi