forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (24 loc) · 709 Bytes
/
index.php
File metadata and controls
33 lines (24 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
error_reporting(NULL);
$TAB = 'SERVER';
// Main include
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check user
if ($_SESSION['userContext'] != 'admin') {
header("Location: /list/user");
exit;
}
// Check POST request
if (!empty($_POST['save'])) {
// Set success message
$_SESSION['ok_msg'] = _('Info (Read-only mode): Crontab can be edited only trough ssh');
}
$v_config_path = '/etc/crontab';
$v_service_name = strtoupper('cron');
// Read config
$v_config = shell_exec(HESTIA_CMD."v-open-fs-config ".$v_config_path);
// Render page
render_page($user, $TAB, 'edit_server_service');
// Flush session messages
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);