I am writing a Cassandra shell script. I want to add below error codes in the script, so that i can use these error codes in different scenarios.
65 Unrecoverable - Script Terminated
66 Recoverable - Manual Intervention needed
67 Warning
I am writing a Cassandra shell script. I want to add below error codes in the script, so that i can use these error codes in different scenarios.
65 Unrecoverable - Script Terminated
66 Recoverable - Manual Intervention needed
67 Warning
You can do something like:
service dse start
if [ $? -eq 0 ]
then echo "successfully installed"
else echo "Unrecoverable-Script Terminated" ; exit 65
fi
This is just example how to print message and then use custom exit code.