POSTIN
/bin/sh
/etc/rc.d/init.d/httpd reload
echo "updating wiki system pages..."
# process .rpmnew files
cd /var/www/moin/data/text
[ -e *.rpmnew ] && for newfile in *.rpmnew ; do
file=`echo $newfile | sed 's/.rpmnew$//'`
echo " - processing page $file (new version)"
su - apache -c "/usr/bin/moin-changePage --base=/var/www/moin \
--action=edit --page=\"$file\" \
--content-file=\"/var/www/moin/data/text/$newfile\" \
--user=\"System\" --comment=\"system upgrade\""
[ $? -eq 0 ] && rm -f $newfile
done
# process .rpmsave files
[ -e *.rpmsave ] && for delfile in *.rpmsave ; do
file=`echo $delfile | sed 's/.rpmsave$//'`
echo " - processing page $file (deleted)"
su - apache -c "/usr/bin/moin-changePage --base=/var/www/moin \
--action=delete --page=\"$file\" \
--user=\"System\" --comment=\"system upgrade\""
[ $? -eq 0 ] && rm -f $delfile
done
# also clear any bad rc value
echo "update done."
POSTUN
/bin/sh
/etc/rc.d/init.d/httpd reload