Adding complete custom task



  • I have added the Task Types plugin and have a working task that boots me into an ISO.

    I have accomplished this by putting this into the kernel arguments: && imgfree && initrd http://${fog-ip}/fog/isoimg/LiteTouchPE_x64.iso && chain memdisk iso raw

    My understanding is that this effectively “hijacks” the boot sequence by slipping in my ISO after FOS loads successfully.

    Is there a way that I can can mark the task complete right before I boot into the ISO?

    Where can I find the existing tasks so I can view the source?

    Thanks!



  • @sebastian-roth Not a bad thought.

    I enabled the API in FOG Configuration > Fog Settings > API Enabled > Update and copied the API key.
    I then created a new user and got their API key.
    I am trying this:

    curl -H 'fog-api-token: <server token>' -H 'fog-user-token: <user token>' -H 'Content-Type: application/json' -X GET http://fog.home/fog/system/info
    

    And I get a 404:

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL /fog/system/info was not found on this server.</p>
    <hr>
    <address>Apache/2.4.33 (Ubuntu) Server at fog.home Port 80</address>
    </body></html>
    

    Something else I need to do to enable?

    EDIT:
    Switched to working branch as per this, no luck: https://forums.fogproject.org/topic/11764/api-broken-after-update-to-1-5-2
    Same issue when trying via IP instead of DNS name.


  • Developer

    @fishfox Maybe think about using the API? There is a good post on this in the forum: https://forums.fogproject.org/topic/10036/api


 

526
Online

5.4k
Users

12.6k
Topics

118.9k
Posts