mirror of
https://github.com/fruithost/Panel.git
synced 2026-11-30 20:35:44 +09:00
21 lines
517 B
PHP
21 lines
517 B
PHP
<?php
|
|
use fruithost\Database;
|
|
use fruithost\Auth;
|
|
use fruithost\I18N;
|
|
|
|
if(isset($_POST['action'])) {
|
|
switch($_POST['action']) {
|
|
case 'reboot':
|
|
if(!Auth::hasPermission('SERVER::MANAGE')) {
|
|
$this->assign('error', I18N::get('You have no permissions for this action!'));
|
|
return;
|
|
}
|
|
|
|
$this->assign('success', I18N::get('The System will be rebooted now!'));
|
|
|
|
// @ToDo save in DB, execute by daemon!
|
|
shell_exec('/sbin/shutdown -r now');
|
|
break;
|
|
}
|
|
}
|
|
?>
|