• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Trigger a local script on the server from fog.imgcomplete

Scheduled Pinned Locked Moved
FOG Problems
2
4
444
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z
    zaboxmaster
    last edited by Jul 28, 2022, 2:17 PM

    Hi Guys

    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?

    ${web}service/deletehosts.sh

    I even tried Curl -s but I cannot seem to get it right . What would the correct syntax be.

    G 1 Reply Last reply Jul 28, 2022, 5:30 PM Reply Quote 0
    • G
      george1421 Moderator @zaboxmaster
      last edited by Jul 28, 2022, 5:30 PM

      @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.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      Z 1 Reply Last reply Jul 29, 2022, 2:44 PM Reply Quote 0
      • Z
        zaboxmaster @george1421
        last edited by Jul 29, 2022, 2:44 PM

        @george1421 Is this article still relevant ???

        https://wiki.fogproject.org/wiki/index.php/Bypass_Host_Registration#Multicast_Deployment

        G 1 Reply Last reply Jul 29, 2022, 4:10 PM Reply Quote 0
        • G
          george1421 Moderator @zaboxmaster
          last edited by Jul 29, 2022, 4:10 PM

          @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.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post

          149

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project