blob: 6fd384ed2fbf9d07ee033c91c0cdd0b088d5c2c3 (
plain) (
tree)
|
|
<?php
class Home {
public function __construct() {
}
public function tabHome($f3) {
// one command is 'sh -c' and the other command is 'grep'
// so we need more than two commands to find the server
if (shell_exec('ps aux | grep "org.openslx.imagemaster.App" | wc -l') > 2) {
$f3->set('serverstatus', true);
} else {
$f3->set('serverstatus', false);
}
// now render the view
echo Template::instance()->render('views/home.htm');
}
}
?>
|