Calling Config file in the Script.. Please help

Hi Guys,
I need some help related to my script... I will explain you briefly about my script and requirement

I written one script which will monitor all my services in the server and send a mail to me....
There are about 10 Services(Processes) running on my services, and I have written 10 functions in the script and calling these functions in main function.
Almost 90 % of each script is doing the same thing what the other 9 scripts do, Like each script contains service name,Log path, Host name, getting the latest log ..etc..

Only slight difference in each script is, getting the Process ID of each service and Log pattern.

When ever there is a new service added in my server, i am adding a new function in my script, which is really confusing for my team mates to change the script, So I want to make it as Generic.

To make the script Generic I am thinking of to create a one config file and put all the common thing in that file and call that file from my script, and my script will contain one for loop and it will get the service names and run one by one.

so that new service(process) added in my server, so new person will just add the common thing in the config file and run the script..

So Script must be knowledge enough to get the details from the config file and run the script

But I am not that knowledge enough in Script to write this logic in my generic script.

can some one please help me out here... Sorry for big mail...

Regards,
Anji

Posting your script (by changing some parameters for privacy) would be very helpful :slight_smile: