Update config.php

This commit is contained in:
ehpersonal38
2022-06-10 09:47:49 -04:00
parent 6f09d9fb7c
commit 1407b718b1
+12
View File
@@ -13,6 +13,11 @@ function syslog_shell_exec($cmd, $sudo_user = null) {
}
}
if(isset($_GET['restart_php']) && $_GET['restart_php'] == "true") {
shell_exec("sudo service php7.4-fpm restart");
die();
}
# Basic Settings
if(isset($_GET["latitude"])){
$latitude = $_GET["latitude"];
@@ -39,6 +44,13 @@ if(isset($_GET["latitude"])){
if(isset($timezone)) {
shell_exec("sudo timedatectl set-timezone ".$timezone);
date_default_timezone_set($timezone);
echo "<script>setTimeout(
function() {
const xhttp = new XMLHttpRequest();
xhttp.open(\"GET\", \"scripts/config.php?restart_php=true\", true);
xhttp.send();
}, 1000);</script>";
}
// logic for setting the date and time based on user inputs from the form below