Sophie

Sophie

distrib > PLD > ac > amd64 > by-pkgid > e7f92a2b6539f99325ecae1b34022dae > scriptlet

wwwoffle-2.9a-3.amd64.rpm

PREIN

/bin/sh
test -h /var/cache/wwwoffle/html || rm -rf /var/cache/wwwoffle/html

 
 
if [ -n "`/usr/bin/getgid wwwoffle`" ]; then 
	if [ "`/usr/bin/getgid wwwoffle`" != "119" ]; then 
		echo "Error: group wwwoffle doesn't have gid=119. Correct this before installing wwwoffle." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding group wwwoffle GID=119." 
	/usr/sbin/groupadd -g 119 -r wwwoffle 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : 
fi;
 
 
 
if [ -n "`/bin/id -u wwwoffle 2>/dev/null`" ]; then 
	if [ "`/bin/id -u wwwoffle`" != "119" ]; then 
		echo "Error: user wwwoffle doesn't have uid=119. Correct this before installing wwwoffle." 1>&2 
		exit 1 
	fi 
else 
	echo "Adding user wwwoffle UID=119." 
	/usr/sbin/useradd \
		 \
		-u 119 \
		-r \
		-d /var/cache/wwwoffle \
		-s /bin/false \
		-c "wwwoffle daemon"\
		-g wwwoffle \
		 \
		 \
		wwwoffle 1>&2 || exit $? 
	[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || : 
fi;

PREUN

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

POSTIN

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

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
	/usr/lib/rpm/user_group.sh user del wwwoffle
	/usr/lib/rpm/user_group.sh group del wwwoffle
fi

Triggers

wwwoffle < 2.7

/bin/sh
echo Note!  Your existing cache and config file look earlier than
echo 2.7 version. There have been several major changes in config
echo file and some minor changes in cache handling. Read the file
echo NEWS and following at a pinch for details. All the necessary
echo files are available from within your documentation directory.

wwwoffle < 2.8

/bin/sh
chown wwwoffle:wwwoffle -R \
	/var/cache/wwwoffle/{ftp,http,lastout,lasttime,local,monitor,outgoing,temp,prevout[1-7],prevtime[1-7]}