initial bug fixes

This commit is contained in:
Matthew Saunders Brown 2021-02-16 13:36:46 -08:00
parent d6f227565d
commit 6b72c5fe07
2 changed files with 3 additions and 4 deletions

View File

@ -113,11 +113,11 @@ elif [ "$mbox_id" -gt '0' ]; then
vm_forwards_id=`eval $dbcmd $dbcmdopts \"$dbquery\"`
if [ -z $vm_forwards_id ]; then
# existing forward does not exist, add it now
dbcommand="INSERT INTO vm_forwards SET mbox_id='$mbox_id', forward_to='$forward_to'"
if [ -n $save_local ]; then
dbquery="INSERT INTO vm_forwards SET mbox_id='$mbox_id', forward_to='$forward_to'"
if [ ! -z $save_local ]; then
dbquery="$dbquery, save_local='$save_local'"
fi
echo $dbcmd $dbcmdopts \"$dbquery;\"
eval $dbcmd $dbcmdopts \"$dbquery\;\"
else
echo "ERROR: Forward for $email already exists. To change either del then add or use mod script."
exit 1

View File

@ -48,7 +48,6 @@ while getopts "h" opt; do
h )
help
exit;;
;;
\? )
echo "Invalid option: $OPTARG" 1>&2
exit;;