init from 4 old repositories
This commit is contained in:
3
restartprocesspage/README.md
Normal file
3
restartprocesspage/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### restartprocesspage
|
||||
|
||||
Web page for restart some process
|
||||
18
restartprocesspage/index.html
Normal file
18
restartprocesspage/index.html
Normal 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
4
restartprocesspage/start.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
pkill "part_of_process_name"
|
||||
delay 2
|
||||
process_exec -param
|
||||
6
restartprocesspage/touch.php
Normal file
6
restartprocesspage/touch.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
$e = "/var/www/restart/start.sh";
|
||||
shell_exec("$e");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user