Possible to call external script?

Hi

Is it possible to have a bash script call an external bash script? For instance, I have a series of monitor scripts that check for running services (such as httpd, postmaster). Each monitor script is individual to the service. If a service fails, I would like to have a larger script that goes through a process, cleanly shutting down related services, logging out users and unmounting a RAID.

Is it possible to have this larger script called from within the smaller monitor scripts?

Thanks

Mike

As long as the external scripts do not end with exit.

script 1

#!/bin/bash
# t.sh
echo " hi there"

script 2

#!/bin/bash
# s.sh
echo "going into t.sh"
./t.sh
echo " back from t.sh"

s.sh calls t.sh when t.sh is done .s.sh resumes. Is that what you mean?

Hi Jim

Thanks for the reply.

Yeah that is what I mean, but I wasn't sure if that was the "correct" way of doing it (I thought there might be some import call or something).

Will give it a whirl.

Mike

As an update, I had to use exec to get this to work, and provided the full path to the script. I am using BASH:

# Call the external service shutdown script
 exec "/Library/IPFailover/scripts/shutdown_services.sh"
 exit 0

Mike