Well, I like to mark /usr/bin/program.sh as executable using following command:
chmod +x /usr/bin/program.sh
I want the above command to be executed at the end of installation of the Debian package.
Is there a painless way to inject the command into the deb?
Thanks for looking!
use
dpkg-deb
to extract the .deb fileCreate a temp dir
Extract the .deb file to temp directory
Now change the DEBAIN/postinst file. This script be called right after the installation of package. So add the code which is needed for you.
Rebuild the package
or
If you don't want to edit .deb file. Create a simple shell script to call the .deb and the command you want to run.
and run it as
./test.sh
Hope this helps