How do I take multiple values for same name in -S option?

19 views
Skip to first unread message

shrinath_m2

unread,
Apr 17, 2012, 9:54:56 AM4/17/12
to capis...@googlegroups.com
Hi, 

I have few binaries, like so:  xx-1ab, xx-2bc, xx-3cd, xx-4de
I have written a task to kill the binaries using pkill. For that, the cap command I used is something like: 

cap -S kill=xx-2bc kill-bin

This is ok if I want to restart only 1 specific binary. How do I do if I want to restart 2 binaries? 
I am looking for something in lines of 

cap -S kill=xx-2bc, xx-3cd kill-bin

How to make such things happen? 
ps: if you know a better approach, let me know...

Regards, 
shrinath_m2

Rafa García

unread,
Apr 22, 2012, 3:21:03 PM4/22/12
to capis...@googlegroups.com
You can define a separator and then handle the parameter. In example:

kill =xx-2bc,xx-3cd,xx-4de

Then in your deploy file something like this:

task_list = kill.split(",")

Regards

2012/4/17 shrinath_m2 <cool....@gmail.com>
shrinath_m2

--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en

Shrinath M

unread,
Apr 22, 2012, 9:39:01 PM4/22/12
to capis...@googlegroups.com

Ah... I feel like a fool for not thinking something that simple... Great solution... Thanks...

Regards,
Shrinath M

Rafa García

unread,
Apr 23, 2012, 8:04:34 AM4/23/12
to capis...@googlegroups.com
You're welcome :)

2012/4/23 Shrinath M <cool....@gmail.com>
Reply all
Reply to author
Forward
0 new messages