service.cgi: script generation