Hi,
I would like to execute a script automatically after each apt-get upgrade. Is there an easy way to do that?
Hi,
I would like to execute a script automatically after each apt-get upgrade. Is there an easy way to do that?
Last edited by Axio; March 9th, 2012 at 01:48 PM.
Try doing an apt-get upgrade through a script and call your script other script from current one .
“Progress is made by lazy men looking for easier ways to do things”
— Robert A. Heinlein
Then, providing this script is called "after-update.sh", runCode:#!/bin/bash # This runs update and upgrade sudo apt-get update; sudo apt-get upgrade # Change into the directory of your script cd ~/scripts # And run it ./my_script.sh # Or run some other command dpkg --get-selections | grep firefox
CheersCode:chmod +x after-update.sh ./after-update.sh
Code:sudo apt-get upgrade ; ./<your script >
Dont miss anything even it is small. one small pin is enough to bring down a man.
THanks it is what I needed! I should have thought about it before.
IF you have got your solution , never forget to mark the thread as closed .
Cheers .
“Progress is made by lazy men looking for easier ways to do things”
— Robert A. Heinlein
apt-get upgrade && sh "path of your script"
Last edited by pavi_elex; March 9th, 2012 at 04:15 PM.
Bookmarks