Skip to content
Permalink
Browse files

Remove Cockpit from Pi Zero/1

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 19, 2019
1 parent a96305a commit d9d977c5b5e44d83bff01affe410afac810aa392
Showing with 6 additions and 5 deletions.
  1. +4 −4 config/index.php
  2. +2 −1 init.php
@@ -717,15 +717,15 @@ function sanitize($string) {
if (checkConfEnabled('monitorix') == true) $checked = 'CHECKED="CHECKED"'; else $checked = '';
echo '<label class="toggle text-right"><input ' . $checked . ' name="monitorix" type="checkbox" class="services reboot"><i></i>Monitorix</label>';
if (ver('nems') >= 1.4) {
if (ver('nems') >= 1.4 && $platform->num != 0 && $platform->num != 1 ) { // not included on Pi 1 or Zero
if (checkConfEnabled('cockpit') == true) $checked = 'CHECKED="CHECKED"'; else $checked = '';
echo '<label class="toggle text-right"><input ' . $checked . ' name="cockpit" type="checkbox" class="services reboot"><i></i>Cockpit</label>';
}
if (ver('nems') >= 1.4) {
if (checkConfEnabled('tvpw') == true) $checked = 'CHECKED="CHECKED"'; else $checked = '';
echo '<label class="toggle text-right"><input ' . $checked . ' name="tvpw" type="checkbox" class="services"><i></i>Allow TV Dashboard Without Password</label>';
}
}
?>
<script>
@@ -1,6 +1,7 @@
<?php
if (isset($functions_loaded) && $functions_loaded == 1) {
$ip = trim(shell_exec('/usr/local/bin/nems-info ip'));
$platform = ver('platform');
?><!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
@@ -84,7 +85,7 @@ function resizeIframe(obj) {
<div class="call-action-v1-in">
<h3 class="color-light" style="font-weight: bold;">Your NEMS server is not yet initialized.</h3>
<?php
if (ver('nems') < 1.4) {
if (ver('nems') < 1.4 || $platform->num == 0 || $platform->num == 1) {
echo '<p class="color-light">SSH to your NEMS server (' . $ip . ') and run:<br /><em>sudo nems-init</em></p>';
} else {
echo '<p class="color-light">SSH to your NEMS server (' . $ip . ') or <a href="https://' . $self->host . ':9090/system/terminal">open a browser-based terminal session</a> and run:<br /><em>sudo nems-init</em></p>';

0 comments on commit d9d977c

Please sign in to comment.
You can’t perform that action at this time.