Writing a custom resource script

In the following recipe, we will look at how to write a basic script.