Skip to content

Commit

Permalink
Add IP address to init screen
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Dec 8, 2018
1 parent 13c2ee5 commit 1ed01d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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]-->
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 1ed01d8

Please sign in to comment.