mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:27:03 +02:00
added a piler daemon reload button to the policy pages. Thx for Jack Zielke for the idea
This commit is contained in:
36
webui/controller/policy/apply.php
Normal file
36
webui/controller/policy/apply.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerPolicyApply extends Controller {
|
||||
private $error = array();
|
||||
|
||||
public function index(){
|
||||
|
||||
$this->id = "content";
|
||||
$this->template = "policy/apply.tpl";
|
||||
$this->layout = "common/layout-empty";
|
||||
|
||||
|
||||
$request = Registry::get('request');
|
||||
|
||||
$db = Registry::get('db');
|
||||
$lang = Registry::get('language');
|
||||
|
||||
if(Registry::get('admin_user') == 0) {
|
||||
die("go away");
|
||||
}
|
||||
|
||||
system('sudo -n /etc/init.d/rc.piler reload', $val);
|
||||
|
||||
if($val === 0) {
|
||||
print $lang->data['text_applied'];
|
||||
} else {
|
||||
print $lang->data['text_install_sudo_apply'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user