Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you stop a perl Dancer/Starman/Plack server?

I started a Dancer/Starman server using:

sudo plackup -s Starman -p 5001 -E deployment --workers=10 -a mywebapp/bin/app.pl

but I'm unsure how I can stop the server. Can someone provide me with a quick way of stopping it and all the workers it has spawned?

like image 400
Vijay Boyapati Avatar asked Jun 17 '13 21:06

Vijay Boyapati


2 Answers

Use the

--pid /path/to/the/pid.file

and you can kill the process based on his PID

So, using the above options, you can use

kill $(cat /path/to/the/pid.file)

the pid.file simply stores the master's PID - don't need analyze the ps output...

like image 89
jm666 Avatar answered Oct 23 '22 19:10

jm666


pkill -f starman

Kill processes based on name.

like image 42
Shibu Avatar answered Oct 23 '22 18:10

Shibu