run.sh to full path
parent
7e521a20c5
commit
e9bc8e5043
|
|
@ -4,7 +4,7 @@
|
|||
"processes": [
|
||||
{
|
||||
"name": "web-server",
|
||||
"path": "/home/vladislav/web/web-server",
|
||||
"path": "/home/vladislav/web/web-server/run.sh",
|
||||
"dependencies": {
|
||||
"files": [
|
||||
{
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
},
|
||||
{
|
||||
"name": "temp-process",
|
||||
"path": "/home/vladislav/web/temp-process",
|
||||
"path": "/home/vladislav/web/temp-process/run.sh",
|
||||
"dependencies": {
|
||||
"files": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ pub async fn restart_process(name: &str, path: &str) -> Result<(), CustomError>
|
|||
}
|
||||
|
||||
pub async fn start_process(name: &str, path: &str) -> Result<(), CustomError> {
|
||||
let runsh = format!("{}{}", path, "/run.sh");
|
||||
// let runsh = format!("{}{}", path, "/run.sh");
|
||||
let mut command = Command::new("bash");
|
||||
command.arg(runsh);
|
||||
command.arg(path);
|
||||
|
||||
match command.spawn() {
|
||||
Ok(_) => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
./$(pwd)/temp-process
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
"processes": [
|
||||
{
|
||||
"name": "temp-process",
|
||||
"path": "/home/vladislav/web/runner-rs/examples/",
|
||||
"path": "/home/vladislav/web/runner-rs/examples/run.sh",
|
||||
"dependencies": {
|
||||
"files": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue