Pregunta

I'm working on a deployment process for work and have run into a bit of a snag. Its more of a quality of life thing than anything else. I've been following Hynek Schlawack's excellent guide and have gotten pretty far. The long and short of what I'm trying to do is install a python application along with a deployment of the python version I'm currently using. I'm using fpm to build an RPM that will then be sent and installed to site.

As part of my deployment, I'd like to run some post-install scripts. Which I can specify in fpm using the "--post-install {SCRIPT_NAME}" This works all well and good when the script is an actual linux script. However, I'd really like to run a python script as my post-install. I can specify an executable python script, but it fails because I believe it is trying to execute the script as: bash my_python_script.py

Does anyone know if there is a way to execute a python script post-install of an RPM?

Thanks in advance!

¿Fue útil?

Solución

In the spec file you can specify what interpreter the %post script is for by using the -p parameter, e.g. %post -p /usr/bin/perl .

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top