Friday, May 10, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 3195  / 2 Years ago, thu, august 11, 2022, 6:53:52

I just got inspired of this project:




http://www.opendesktop.org/content/show.php?content=145633




Well , i wanted to do a similar thing , after dpkg places something new in /usr/share/applications directory , but where should my script point to , and the parameter to pass in ?


More From » installation

 Answers
0

If the script do not takes parameters, add a file in /etc/apt/apt.conf.d/, for example 92local (numbers are used to force execution order of scripts in that directory), with the following content:



DPkg::Post-Invoke { "/path-to/my-script"; };


and remember to make it executable.



Cannot find right now information on how to pass parameter or input to the script.

If can be of help, when running apt on command line, you should find the command line in the environment variable SUDO_COMMAND.


[#43271] Friday, August 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eatack

Total Points: 245
Total Questions: 120
Total Answers: 113

Location: Estonia
Member since Wed, Jun 8, 2022
2 Years ago
;