diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | ncp-web/index.php | 9 |
2 files changed, 9 insertions, 1 deletions
@@ -35,6 +35,7 @@ This code also generates the [NextCloudPi docker images](https://hub.docker.com/ * Setup wizard ( NEW 09-27-2017 ) * NextCloudPi Web Panel ( NEW 07-24-2017 ) * Wi-Fi ready ( NEW 03-31-2017 ) + * Ram logs ( NEW 03-31-2017 ) * Automatic security updates, activated by default. ( NEW 03-21-2017 ) * Let’s Encrypt for trusted HTTPS certificates.( NEW 03-16-2017 ) * Fail2Ban protection against brute force attacks. ( NEW 02-24-2017 ) diff --git a/ncp-web/index.php b/ncp-web/index.php index fb95e778..dac32d7a 100644 --- a/ncp-web/index.php +++ b/ncp-web/index.php @@ -17,6 +17,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"> <meta name="mobile-web-app-capable" content="yes"> <?php + // redirect to activation first time exec("a2query -s ncp-activation", $output, $ret); if ($ret == 0) { header("Location: activate"); @@ -165,12 +166,18 @@ HTML; $files = array_diff(scandir($modules_path), array('.', '..', 'nc-wifi.sh', 'nc-info.sh', 'l10n')); foreach ($files as $file) { + $script = pathinfo($file, PATHINFO_FILENAME); + + $txt = file_get_contents($modules_path . $file); $active = ""; - if (preg_match('/^ACTIVE_=yes$/m', $txt, $matches)) + $etc = '/usr/local/etc'; + exec("bash -c \"source $etc/library.sh && is_active_script $etc/nextcloudpi-config.d/$script\".sh", $output, $ret); + if ($ret == 0) { $active = " ✓"; + } echo "<li id=\"$script\" class=\"nav-recent\">"; echo "<a href=\"#\"> {$l->__($script, $script)}$active </a>"; |