I have a script that rsyncs and ends like thisrsync -azvh /dir -e ssh usr@server.com:/RESULT=$?# check result of rsync db'sif [ $RESULT != 0 ]; then    echo -e rsync exit Code: $RESULT \nFAILED to rsync backupselse    echo SUCCESSFULL rsync of backupsfiI have just been asked to wrap it in an API but the API states that 0=fail and 1=success. How can I change the exit code to reflect this? Do I need to assign it a variable?
Change exit code from 0 to 1 in bash script
bash;variable
exit 1 will exit with an error code of 1 and exit 0 will exit with an error code of 0.For instance:rsync -azvh /dir -e ssh usr@server.com:/RESULT=$?# check result of rsync db'sif [ $RESULT != 0 ]; then    echo -e rsync exit Code: $RESULT \nFAILED to rsync backups    exit 0else    echo SUCCESSFULL rsync of backups    exit 1fi