added dir option to service startup script