Initial
This commit is contained in:
31
web/edit/server/cron/index.php
Normal file
31
web/edit/server/cron/index.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$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 only be edited via 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"]);
|
||||
Reference in New Issue
Block a user