#!/usr/local/bin/bash

#
# quick installer for the incident.pl script and settings
#
# Zoidial Incorporated
# Eric Thern
#
# January 25, 2003
#


echo "
This script sets up the config for incident.pl

 ***
IMPORTANT: it is assumed that this is all installed in /root/incident
 ***

the part of incident.pl.cfg we set up here looks like this:

EMAIL information
\$MYDOMAIN = "mydomain.com";
\$FROM_ADDR = 'Full Name <youremail@address.com>';
\$SMTP_SERVER = "your.mail.server";
\$ALWAYS_CC = 'someone@whatever.blah';

"



echo "Enter your domain (example: mydomain.com): "
read domain
echo ""

echo "Enter your email address (example: Joe Smith <abuse@mydomain.com>): "
read email
echo ""

echo "Enter SMTP Server (example: mail.mydomain.com): "
read smtp
echo ""

echo "Enter CC: address - address things are sent to as well (example: abuse@mydomain.com): "
read cc
echo ""

cp incident.pl.cfg.template incident.pl.cfg.template-ORIGINAL

sed -e "s/ZDLMYDOMAIN/$domain/" incident.pl.cfg.template > incident.pl.cfg.BAK && mv incident.pl.cfg.BAK incident.pl.cfg.template
sed -e "s/ZDLEMAIL/$email/" incident.pl.cfg.template > incident.pl.cfg.BAK && mv incident.pl.cfg.BAK incident.pl.cfg.template
sed -e "s/ZDLSMTP/$smtp/" incident.pl.cfg.template > incident.pl.cfg.BAK && mv incident.pl.cfg.BAK incident.pl.cfg.template
sed -e "s/ZDLCC/$cc/" incident.pl.cfg.template > incident.pl.cfg.BAK && mv incident.pl.cfg.BAK incident.pl.cfg.template

cp incident.pl.cfg.template incident.pl.cfg

mv -f incident.pl.cfg.template-ORIGINAL incident.pl.cfg.template

echo "

New config file saved as incident.pl.cfg

Read the README file to find out about what you should run

PLEASE edit the file ".sig"

"



