Trigger a local script on the server from fog.imgcomplete
I have a very strange one, the idea is that after I deploy the image I want to clear the hosts in the database so if I am using a USB-Ethernet adapter I do not have to log on and clear the previous hosts.
So I currently use the IPXE USB method : https://forums.fogproject.org/topic/7727/building-usb-booting-fos-image
I have the script in the /var/www/fog/service/ folder … deletehosts.sh.
Now the script works from the server but I cannot for the life of me work out how to trigger the script from the fog.imgcomplete file on the USB.
Am I being stupid in trying technics such as string to use the following in the script?
I even tried Curl -s but I cannot seem to get it right . What would the correct syntax be.
@zaboxmaster Well the problem is (not really a problem, but a limitation) if you were pxe booting into the FOG iPXE menu you could use the deploy image function. This schedules a deployment now for an image without first requiring the target computer to be registered in FOG. To make this work it really needs iPXE running to dynamically build the deploy image menus. You should be able to create this menu synthetically with Grub menu.
@george1421 Is this article still relevant ???
@zaboxmaster The short answer is no. That wiki page refers to FOG 0.3. That feature is already built into FOG 1.5.9 through a different method. At the FOG iPXE menu, you can select Deploy Image. You can thus deploy an image without registering the computer with FOG. A system reseller might use this feature to load a base OS on a computer then never see it again.
There are a few caveats with this method. The big one is that the FOG client can’t be used because the target computer is never registered with FOG. So this means your image deployment needs to be complete and not use any function provided by the FOG Client. I can tell you in my environment I don’t use the FOG client. I use the windows unattend.xml to name the computer and connect it to AD. I use a FOG Post install script to update the unattend.xml file with deployment time settings (computer name, Domain OU, timezone, keyboard mapping, etc). So it can be done rather well without the FOG client.