I'm trying to creat a .deb that, as part of its installation process, pings an external server.
So I have an install_foobar script which does the install.
However, I can't get install_foobar to curl
out to the server, or, for that matter, echo out to /tmp.
What is the environment that is created? I am wondering if its some sort of pbuilder-esque world that is removed after the install finishes...
In order to perform any actions besides unpacking files at install/remove time you will need to make use of package maintainer scripts
(Note, "pinging home" is often seen as somewhat dubious practice by software if done without the consent of the user, though seeing as this is an in-house package, I guess that's not really an issue).
A rough example would be using a packagename.postinst something like this:
Obviously you'd need a corresponding removal in the pre/postrm scripts if you added any permanent files in the pre/postinstall scripts.
Templates for preinst, postinst, prerm and postrm scripts are available via the dh-make package, in the files