summaryrefslogtreecommitdiffstats
path: root/management-interface/api/models/Home.php
blob: 6fd384ed2fbf9d07ee033c91c0cdd0b088d5c2c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?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');
	}
}

?>