Skip to content

Commit

Permalink
Moved stop command into a bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleykleynhans committed Apr 11, 2024
1 parent 01c18b3 commit 3cd3013
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const PORT = 8000;
app.use(express.static('public'));

app.get('/stop_a1111', (req, res) => {
exec('fuser -k 3001/tcp', (error, stdout, stderr) => {
exec('scripts/stop_a1111.sh &', (error, stdout, stderr) => {
if (error) {
console.error(`Error stopping A1111: ${error}`);
}
Expand All @@ -26,7 +26,7 @@ app.get('/start_a1111', (req, res) => {
});

app.get('/stop_kohya', (req, res) => {
exec('fuser -k 3011/tcp', (error, stdout, stderr) => {
exec('scripts/stop_kohya.sh &', (error, stdout, stderr) => {
if (error) {
console.error(`Error stopping Kohya_ss: ${error}`);
}
Expand All @@ -46,7 +46,7 @@ app.get('/start_kohya', (req, res) => {
});

app.get('/stop_comfyui', (req, res) => {
exec('fuser -k 3021/tcp', (error, stdout, stderr) => {
exec('scripts/start_comfyui.sh &', (error, stdout, stderr) => {
if (error) {
console.error(`Error stopping ComfyUI: ${error}`);
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/stop_a1111.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
fuser -k 3001/tcp
2 changes: 2 additions & 0 deletions scripts/stop_comfyui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
fuser -k 3021/tcp
2 changes: 2 additions & 0 deletions scripts/stop_kohya.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
fuser -k 3011/tcp

0 comments on commit 3cd3013

Please sign in to comment.