forked from LightsOnHudson/FPP-Plugin-Matrix-Message
-
Notifications
You must be signed in to change notification settings - Fork 2
/
fontManagement.php
executable file
·46 lines (29 loc) · 1.22 KB
/
fontManagement.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
//$DEBUG=true;
include_once "/opt/fpp/www/common.php";
include_once 'functions.inc.php';
include_once 'commonFunctions.inc.php';
$pluginName = basename(dirname(__FILE__));
$logFile = $settings['logDirectory']."/".$pluginName.".log";
if(isset($_POST['updateFonts']))
{
logEntry("updating fonts...");
$updateFontCMD = "/usr/bin/sudo /bin/mv /home/fpp/media/upload/*.ttf /usr/local/share/fonts";
exec ($updateFontCMD,$updateOutput);
echo "Install return command: ".$updateOutput."\n";
}
echo "This Page manages the installation of additional fonts to be used by the Matrix Message or other tools that uses fonts real time\n";
echo "<p/> \n";
echo "To install new fonts: \n";
echo "<p/> \n";
echo "<ul> \n";
echo "<li> Upload the TTF file using the File Manager \n";
echo "<li> The files will go to the 'Uploads' tab of the File Manager \n";
echo "<li> Revisit this page and press the 'INSTALL FONTS' button below \n";
echo "<li> This will MOVE the fonts you uploaded to the proper location \n";
echo "<li> You're done \n";
echo "</ul> \n";
?>
<form method="post" action="/plugin.php?plugin=<?echo $pluginName;?>&page=fontManagement.php">
<input type="submit" value="Update Fonts" name="updateFonts" class="buttons">
</form>