Don't append. Escape $
Remove nginx restart. Old way does not work with new OMV.
Restart nginx in the script