adapt postinst script