Added a nice table for displaying currently available servers

This commit is contained in:
gballan committed 2022-09-24 17:33:59 -04:00
1 parent 25b68c4bc6
commit b41b246483
3 files changed
+54 -4

No files matched your search

+9
View File
@@ -54,6 +54,15 @@ $app->post('/create', function (Request $request, Response $response, $args) {
fclose($scriptFile);
chmod($scriptFilePath, 0755);
// save the current version to a text file - this will hopefully be temporary solution
$versionFilePath = join('/', array($serverDir, 'current_version.txt'));
$versionFile = fopen($versionFilePath, 'w');
$versionContent = $params['serverVersion'];
fwrite($versionFile, $versionContent);
fclose($versionFile);
chmod($versionFilePath, 0644);
// redirect the user back to the home page
return $response
->withHeader('Location', '/')
->withStatus(302);