Files
webgui/plugins/dynamix.docker.manager/Docker.page
2020-03-04 17:33:46 +01:00

25 lines
912 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-2020, Lime Technology
* Copyright 2014-2020, 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 **Started** 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>";
}
?>