Write postinst file