Possibility to define pre/post-(un)install scripts
brejoc opened this issue · 4 comments
brejoc commented
Is there a possibility to define pre/post-(un)install scripts? With fpm itself this is possible, but I haven't found an option in fpm-cookery.
beddari commented
Yes, fpm will pick up the files if you put them in buliddir. This is an (abandoned) project that has some example code for how it works https://github.com/andytinycat/puppet-omnibus/blob/master/puppet.rb#L47-L50
Look at the methods at the end for how the files are written.
brejoc commented
So there only needs to be a file named post-install
(or pre-uninstall
, post-uninstall
, pre-install
) in the build-dir?
beddari commented
Yep, that should basically be all that is needed.
bernd commented
This already works. See the haproxy recipe for an example.