This is the correct hook for what you want to achieve.
Never ran distributed configs, but I guess you have to modify the hook, zip and upload the new configuration to Shotgun. Check out
(don’t know how that works during development but I’m sure there is a way to use your hook locally)