#!/bin/sh

#####################
# Site-specific parameters
# Change this variables as needed

# glib-config
GLIBCONF = /usr/local/bin/glib-config
GLIBLIB = `$GLIBCONF --libs`

# MySQL include and lib directories
MYSQLINC = /usr/local/mysql/include
MYSQLLIB = /usr/local/mysql/lib

# Generic LD_LIBRARY_PATH
LD_LIBRARY_PATH=$GLIBLIB:$MYSQLLIB

# E-mail address where crash notifications are sent
NOTIFY = dbase-errs@ripe.net

#####################


# Host-specific settings
if [ `hostname` = "rowan" ]; then
  LD_LIBRARY_PATH=/ncc/dbwork/platforms/sparc-sun-solaris2.6/lib:/usr/local/mysql/lib/
  export LD_LIBRARY_PATH
fi

if [ `hostname` = "reimp" ]; then
  LD_LIBRARY_PATH=/ncc/dbwork/platforms/i386-pc-solaris2.7/lib:/usr/local/mysql/lib/
  export LD_LIBRARY_PATH
fi

if [ `hostname` = "yucca" ]; then
  LD_LIBRARY_PATH=/ncc/dbwork/platforms/sparc-sun-solaris2.7/lib:/usr/local/mysql/lib/
  export LD_LIBRARY_PATH
fi


while echo RIP server started `date` >> rip.log
do
  ./whois_rip $1
  /usr/bin/echo "Reimp whoisd crashed & restarted\n" `date` | mailx -s "Reimp whoisd crashed & restarted" $NOTIFY
  sleep 1
done

