[Seaside] How to start an image with PORT parameter

Sebastian Sastre ssastre at seaswork.com
Tue Jul 28 12:05:52 UTC 2009

Now you have a PID for the image you can even monitor and program reactions
(like restarting a service) if something goes wrong with it (no PID, not opening
connections in a port, etc).
Monit can do that for you (http://mmonit.com/monit/).


De: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] En nombre de Mariano
Martinez Peck
Enviado el: Sunday, July 26, 2009 20:12
Para: Randal L. Schwartz
CC: Seaside - general discussion
Asunto: Re: [Seaside] How to start an image with PORT parameter

Thanks to all of you. Now I have these 2 beautiful scripts:


# Para produccion, como no van a estar las X, tengo que poner el
VM_PARAMS="-mmap 200m -vm-sound-null"
#start the vm
# store in a file the PID of squeakVM
echo $! > evince.pid


PID=`cat evince.pid`
kill -15 $PID || exit 0
sleep 2
kill -2 $PID || exit 0
sleep 2
kill -1 $PID || exit 0
sleep 2
kill -9 $PID || exit 0

Thanks for the help!


On Sun, Jul 26, 2009 at 7:58 PM, Randal L. Schwartz <merlyn at stonehenge.com>

>>>>> "Mariano" == Mariano Martinez Peck <marianopeck at gmail.com> writes:

>> Generally, send 15 (SIGTERM), and wait a second or two, and if that
>> doesn't work, send 2 (SIGINT), and if that doesn't work, send 1
>> (SIGHUP).  If that doesn't, REMOVE THE BINARY because the program is
>> badly behaved!

Mariano> Ok.....but how can I do this from a script ?

kill -15 $PID || exit 0
sleep 2
kill -2 $PID || exit 0
sleep 2
kill -1 $PID || exit 0
sleep 2
kill -9 $PID || exit 0


Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090728/2b9f6076/attachment.htm

More information about the seaside mailing list