fix static DG-IDs

- only grep for line that actually start with "Options"
    (ignore commented lines)
  - add counter of activated DG-IDs to header
master
Dominic Reich 4 years ago
parent 582173307a
commit 1206c4f1bf
Signed by: dominic
GPG Key ID: BC9D6AE1A3BE169A

@ -26,12 +26,12 @@
Hostname: <?php echo trim(`hostname`); ?> (<?php echo trim(`hostname -I | cut -d' ' -f1`); ?>)<br /> Hostname: <?php echo trim(`hostname`); ?> (<?php echo trim(`hostname -I | cut -d' ' -f1`); ?>)<br />
<?php <?php
$iniFile = YSFGW_INI; $iniFile = YSFGW_INI;
$logline = `egrep -h Options $iniFile | tail -n 1`; $logline = `egrep -h "^Options" $iniFile | tail -n 1`;
//$options = substr($logline, strpos($logline, "Options=")); //$options = substr($logline, strpos($logline, "Options="));
$optionsLine = explode( "=", $logline ); $optionsLine = explode( "=", $logline );
$DGIDs = explode( ",", $optionsLine[1] ); $DGIDs = explode( ",", $optionsLine[1] );
echo "Static DG-IDs: "; echo "Static DG-IDs (" . count( $DGIDs ) . "): ";
foreach( $DGIDs as $DGID ) { foreach( $DGIDs as $DGID ) {
echo "$DGID "; echo "$DGID ";

Loading…
Cancel
Save