All the function we're trying to get is in these couple of lines, and modelling it as a service feels very odd.  Why not just deliver a utility script that has these lines in and get rid of the extraneous stuff?