Permalink
Browse files

Add IP address to init screen

  • Loading branch information...
NEMS Linux
NEMS Linux committed Dec 8, 2018
1 parent 13c2ee5 commit 1ed01d8936c6901df998235776f53f84bdcd15d4
Showing with 3 additions and 2 deletions.
  1. +3 −2 init.php
@@ -1,5 +1,6 @@
<?php
if (isset($functions_loaded) && $functions_loaded == 1) {
$ip = trim(shell_exec('/usr/local/bin/nems-info ip'));
?><!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
@@ -84,9 +85,9 @@ function resizeIframe(obj) {
<h3 class="color-light" style="font-weight: bold;">Your NEMS server is not yet initialized.</h3>
<?php
if (ver('nems') < 1.4) {
echo '<p class="color-light">SSH to your NEMS server and run:<br /><em>sudo nems-init</em></p>';
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 or <a href="https://' . $self->host . ':9090/system/terminal">open a terminal session</a> to your NEMS server and run:<br /><em>sudo nems-init</em></p>';
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>';
}
?>
</div>

0 comments on commit 1ed01d8

Please sign in to comment.