[PLA-6041] Use env variables if available for the scripts