mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-03 14:21:38 -08:00
changing the way to terminate process
This commit is contained in:
parent
5a0f342103
commit
3f3af11897
1 changed files with 5 additions and 7 deletions
12
.github/workflows/on_merge_to_master.yaml
vendored
12
.github/workflows/on_merge_to_master.yaml
vendored
|
|
@ -24,14 +24,12 @@ jobs:
|
|||
ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=60 -o StrictHostKeyChecking=no ${{ secrets.MOONLITE_AWS_EC2_SSH_USER }}@${{ secrets.MOONLITE_AWS_EC2_SSH_HOST }} << 'EOF'
|
||||
cd /home/ec2-user/apps
|
||||
|
||||
# Kill any existing process of launch.py if running
|
||||
echo "Checking for existing launch.py process..."
|
||||
PID=$(pgrep -f launch.py)
|
||||
if [ -n "\$PID" ]; then
|
||||
echo "Found running process for launch.py. Terminating PID \$PID..."
|
||||
kill -9 \$PID
|
||||
# Terminate any running instances of the Python app
|
||||
if pgrep -f "python launch.py" > /dev/null; then
|
||||
echo "Terminating existing instance of the app..."
|
||||
pkill -f "python launch.py"
|
||||
else
|
||||
echo "No running process found for launch.py."
|
||||
echo "No existing instance found."
|
||||
fi
|
||||
|
||||
# Check if the stable-diffusion-webui folder exists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue