i have developed an application like 2 way client i.e client/server application using c programmming language.

Problem: while i m going uninstall my application with rpm -e testrpm first it will notify my
server that my application is going to uninstall for the i have mady one uninstall.bin
how can i call this uninstall.bin during rpm -e testrpm.

in short i have to do like, when i m going to execute rpm -e testrpm command it will wait for server respond, then it will uninstall my testrpm software.

plz help me