init from 4 old repositories

This commit is contained in:
2019-08-05 16:07:57 +03:00
parent c750e17675
commit fa1425a67b
20 changed files with 378 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
### restartprocesspage
Web page for restart some process

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1 id="res"></h1>
<script type="text/javascript">
var answer = prompt('Enter "yes" if you want to restart process');
if (answer == "yes") {
var tch = new XMLHttpRequest();
tch.open('GET', 'touch.php');
tch.send(null);
document.getElementById("res").innerHTML = "Process was restarted";
} else document.getElementById("res").innerHTML = "Process was not restarted";
</script>
</body>
</html>

4
restartprocesspage/start.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
pkill "part_of_process_name"
delay 2
process_exec -param

View File

@@ -0,0 +1,6 @@
<?php
$e = "/var/www/restart/start.sh";
shell_exec("$e");
?>