#!/bin/bash
# This script will replace "suidperl -T" to "speedy_suid -T -- -T/var/run/speedy"
# Thomas Chung <tchung@openwebmail.org>
# 2003-06-08

echo "Converting suidperl to speedy_suid..."

if ! [ -d /var/www/cgi-bin/openwebmail ];
then 
   echo "It seems Open Webmail is NOT installed!"
   exit 0
fi

cd /var/www/cgi-bin/openwebmail
for name in openwebmail*.pl ; do
   cp -a $name ${name}.old
   sed -e "s/suidperl -T/speedy_suid -T -- -T\/var\/run\/speedy/" < ${name}.old > ${name}
   rm -f ${name}.old
done  

echo "Done"
