If the service isn't ```apache2``` will ```$expect``` being undefined cause warnings?

Is the above definition for ```$expect``` used as an example? Maybe it makes sense for a comment here?