add globals
move hookfile to scripts dir
add postinstall script