Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.deb package postinst call another script in package

Is it possible to call another bash script within postinst?

I am trying to call another bashscript which is inside of the debian package. Currently I do not seem to be having any luck doing this.

<postinst>
./postinst_script_2
like image 627
user204088 Avatar asked Feb 13 '26 15:02

user204088


1 Answers

Yes, you can call another bash script from inside your package during postinst. The postinst happens after the package is unpacked into the filesystem.

You probably can't depend on what the current directory will be when the postinst is run, though. tripleee is right; use an absolute path to call it.

like image 51
the paul Avatar answered Feb 15 '26 03:02

the paul