• Hi Guys

    I am trying to create a certificate of data destruction to prove that the PC has been cleaned when put through FOG. I wanted to know if this has been done by anyone before.

    So to explain what I have tried I must first explain that I only use Fog through a bootable USB and not PXE boot.

    So what I tried to do is create a template HTML file called cert.html in the service directory. I then modified the fog.man.reg file to run an AWK command (see below) to insert the variables into the HTML file and create a new HTML file. This so far has been unsuccessful. I will need to email the report which I will be able to trigger once I create the file.

    Every time I run the command I get a FILE or Directory cannot be found.

    Any ideas ?

    Here is my code :

    awk -v host=$host -v stockcode=$other1 '{sub(/DIGICODE/,host);sub(/SYSMAN/,stockcode); print }' ${web}service/cert.html >> ${web}service/cert_new.html
    

  • @george1421 said in Certificate of Data Destruction:

    e also trivial: https://www.geeksforgeeks.org/php-send-atta

    Thank you so much . Makes perfect sense. Let me try that way .

  • Moderator

    @zaboxmaster While I can’t help you with your task I think I can give you a few pointers.

    1. The first one is application scope. things that run in fog.man.reg runs within the FOS Linux environment. So any local paths you use must be in the init.xz file. This is isolated and separate from the FOG server or the target computer. You can mount the shares to access these remote file systems, but they are not local to FOS Linux.
    2. You can’t use any of the ipxe variables or commands.
    3. You have the power of php on the server. I think you should look there for your certificate generation. From the FOS linux side, unless your task is simple, don’t do it there. Make a curl call to a php program on the fog server to do your bidding.

    Now once you enter the php world, I would place the php file outside of the FOG file path. For example the FOG files should exist at /var/www/html/fog/... Put your php files in /var/www/html/mystuff or something not the fog path. This way the fog installer won’t step on your php file. Also make sure you have a backup copy of the php file you crafted. Pass the necessary run time parameters to the php page via a url call.

    Now for the form generation. You can do it in pure html or PDF. There are PDF libraries like fpdf http://www.fpdf.org/ that you could use to create your certificate.

    Sending emails from php are also trivial: https://www.geeksforgeeks.org/php-send-attachment-email/ If you get emails from FOG deployments then you will get emails from from your php code because you have smtp email setup on your fog server, the emails will take the same path.

287
Online

9.9k
Users

16.2k
Topics

149.0k
Posts