I guess it doesnt need to be sudo? The sudo hack was for restarting nginx. I'll revert this bit.