Update add_client.php

This commit is contained in:
jakani24
2024-02-17 10:58:47 +01:00
parent 5bf9c34101
commit 7633ba2bf1

View File

@@ -110,16 +110,16 @@ include "../../../config.php";
} }
$stmt -> close(); $stmt -> close();
//create the files and download them //create the files and download them
$fp=fopen("/var/www/html/setup.txt","w"); $fp=fopen("/var/www/html/export/setup.txt","w");
fwrite($fp,"$this_server"); fwrite($fp,"$this_server");
fclose($fp); fclose($fp);
$fp=fopen("/var/www/html/secrets.txt","w"); $fp=fopen("/var/www/html/export/secrets.txt","w");
fwrite($fp,"machineid $machineid\n"); fwrite($fp,"machineid $machineid\n");
fwrite($fp,"cert $cert\n"); fwrite($fp,"cert $cert\n");
fwrite($fp,"apikey $apikey\n"); fwrite($fp,"apikey $apikey\n");
fclose($fp); fclose($fp);
echo("<a href='/secrets.txt' download>Download config file1</a>"); echo("<a href='/export/secrets.txt' download>Download config file1</a>");
echo("<a href='/setup.txt' download>Download config file2</a>"); echo("<a href='/export/setup.txt' download>Download config file2</a>");
echo("<a href='/installer.exe' download>Download installer</a>"); echo("<a href='/installer.exe' download>Download installer</a>");
} }
?> ?>