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