salt/www/nginx/srv/www/admin/index.php in salted-rails-0.0.7 vs salt/www/nginx/srv/www/admin/index.php in salted-rails-0.0.8
- old
+ new
@@ -11,9 +11,20 @@
if (preg_match("/(.*).conf/", $entry, $matches)) {
echo '<li><a href="/' . $matches[1] . '/">' . $matches[1] . "</a>\n";
}
}
$d->close();
+
+function command_exist($cmd) {
+ $returnVal = shell_exec("which $cmd");
+ return !empty($returnVal);
+}
+
+$commands = array('facter' => 'System info', 'df' => 'Disk Free', 'ps' => 'Process Status', 'free' => 'Memory Free Status', 'dpkg' => 'Packages installed', 'ifconfig' => 'Network Interfaces');
+foreach ($commands as $cmd => $desc) {
+ echo '<li><a href="/' . $cmd . '.php">' . $cmd . ' - ' . $desc . "</a>\n";
+}
+
?>
<li><a href="phpinfo.php">phpinfo</a>
</ul>
<h2>localhost port mapping</h2>