I'm sure you'll want to get down to troubleshooting first, but once you define your variable you can use it across the script to ensure consistency
Code:
cd /opt/scripts
isitthere="weddown.log"
if [ -e $isitthere ]
then rm -f $isitthere
else /opt/scripts/weddown.sh > /opt/scripts/$isitthere
fi
The script should check from /opt/scripts/ if there is a logfile present...if it is present it removes it and creates a new one.
Unfortunately everytime this runs it will replace the previous logfile so it isn't testing for anything useful. weddown.sh if successful will create the log and this check if successful will ignore it and create a new one.
Perhaps you want to check if the file is missing and run the script if it hasn't run already?
Code:
cd /opt/scripts
isitthere="weddown.log"
if [ -z $isitthere ]
then /opt/scripts/weddown.sh > /opt/scripts/$isitthere
fi
Also your redirect will overwrite the logfile if it's present. This is probably what you expect anyway but I just thought I'd mention it.