run.sh to full path

pull/9/head
Kamila 2024-10-30 11:29:14 +03:00
parent 7e521a20c5
commit e9bc8e5043
4 changed files with 6 additions and 5 deletions

View File

@ -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": [
{

View File

@ -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(_) => {

View File

@ -0,0 +1 @@
./$(pwd)/temp-process

View File

@ -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": [
{