Here is a snippet of my bash code ..can't seem to figure out the error I get; however, if I comment out the first 2 if statements ..it runs fine ..the error I get is "syntax error: unexpected end of file", points the last line
if [[ $# -eq 0 || $# -gt 1 ]] && usage
if [[ $1 != "process1" || $1 != "process2" ]] && usage
if [ "$1" = "$DB" ]; then
echo "$1 process already running..."
exit 1
else
restart_process
fi
if [[ $# -eq 0 || $# -gt 1 ]] && usage
if [[ $1 != "process1" || $1 != "process2" ]] && usage
if [ "$1" = "$DB" ]; then
echo "$1 process already running..."
exit 1
else
restart_process
fi