I have new to scripts .. I want to monitor service on the server - we have two scripts 1 - for checking service is running or not (checking.sh) 2 - start the service (start.sh)
I would like to merge two scripts into single (monitor.sh) and schedule/ cron it. how do I run second script based on first script result IF first script result is 0 need to start the service (second script need to run) ,if first script result is 1 second script no need to run and exit main script.