Files
webgui/plugins/dynamix.docker.manager/Docker.page
2018-12-25 10:01:43 +01:00

25 lines
932 B
Plaintext

Menu="Tasks:60"
Type="xmenu"
Code="e90b"
Cond="exec(\"grep -o '^DOCKER_ENABLED=.yes' /boot/config/docker.cfg 2>/dev/null\")"
----
<?PHP
/* Copyright 2005-2018, Lime Technology
* Copyright 2014-2018, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
if ($var['fsState'] != 'Started') {
echo "<div class='notice shift'>Array must be <span class='strong big'>started</span> to view Docker containers.</div>";
} elseif (!is_file('/var/run/dockerd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/dockerd.pid')))) {
echo "<div class='notice shift'>Docker Service failed to start.</div>";
}
?>