The code for /lib/svc/method/svc-nginx given at http://wiki.nginx.org/Installing_on_Solaris_10_u5 begins with a #!/bin/sh but contains bash-isms. You have to change the first line to #!/bin/env bash if you want it to work