Regarding package monitoring tool

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all,

    Assuming I have a bunch of debian machines with user accounts
having sudo access.

      (i) I wan't to write a script/daemon that remotely checks the system
for a particular package being installed. For e.g. to check whether a host A has
a package p (which I don't deter from using)  installed. How do I enforce
this remotely?.

      (ii) To support my above statement, my script should be more or
less like apt-get (dist-) upgrade, which checks for the list of packages
and upgrades it.  Here instead of just updating it I would want to also
check if package p is installed.

 Any pointers or  help is much appreciated.


Re: Regarding package monitoring tool

Quoted text here. Click to load it

If you can setup keyless logins via SSH then this should be simple:

ssh [hostname] -l [user] dpkg --list [packageName] | grep ^ii

That'll give output if the package is installed.

Quoted text here. Click to load it

ssh [hostname] -l [user] sudo apt-get upgrade [packageName]

Note that you'll need to fiddle with different flags if you want an
unattended upgrade - you might find there is a debconf prompt which
requires answering.

Perhaps "sudo apt-get upgrade --quiet --assume-yes upgrade

Debian GNU/Linux System Administration /

Site Timeline