Is your script pulling the information from Active Directory or another LDAP server? If so, in 9.3.2 you can use LDAP as a source for a dynamic watchlist and not have to use the script. Create the Watchlist as follows.
- Select Dynamic as the WL type.
- Check the box for Enable Automatic Updates and set an appropriate update frequency.
- On the Source Tab select LDAP and enter the IP and credentials for the LDAP server.
- On the query tab, entery your query and select the Lookup Attribute to be returned. The Lookup Attribute will be the value returned by AD. Here is an example.
- Lookup Attribute: sAMAccountName
- Query: (memberof=CN=compliance,CN=Users,DC=mfe,DC=demo,dc=local) This query returns all members of the compliance group on my local AD server.
- Test the query with the test button.
- On the Values tab select the type, Source User
- Select Run Now to immediately populate the WL.
- Once finished, the WL will udpate automatically at the specified frequency from the first tab.
Let me know if this works for you. You may find it easier than maintaining a script.
I am on 9.2.1, so using a perl script calling NET::LDAP to query group.