hi,
my *nix-experience is long ago + running out of time, so: has someone
of you made a shellscript running on OS X, that recognizes if Pd is
still runnig (with ps -cx | grep "pd" ?) and if it is not, restart Pd?
thanks! rainer.
rainer kohlberger ha scritto:
hi,
my *nix-experience is long ago + running out of time, so: has someone
of you made a shellscript running on OS X, that recognizes if Pd is
still runnig (with ps -cx | grep "pd" ?) and if it is not, restart Pd? thanks! rainer.
you can try:
$ PDBIN=/usr/bin/pd ; pgrep $PDBIN &>/dev/null || $PDBIN
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Sep 5, 2005, at 1:02, federico wrote:
my *nix-experience is long ago + running out of time, so: has
someone of you made a shellscript running on OS X, that
recognizes if Pd is still runnig (with ps -cx | grep "pd" ?) and
if it is not, restart Pd?you can try:
$ PDBIN=/usr/bin/pd ; pgrep $PDBIN &>/dev/null || $PDBIN
thanks!
but: -is there a more os x-specific script, because pgrep is not
available on os x, although bsd subsystem is installed. to compile
'proctools 0.4', that provides pgrep for os x, 'bsdmake' is
necessary, which assumes that xcode is installed. after all, it would
consume to much of my time just to get pgrep.
another thing: how to run this script continuously every 15sec? the
pd-'metro' object would be cool for this..
sorry for posting offtopic, but this is really important and i can't
find anything on the web.
rainer.
man cron
google 'cron how to'
since you are on OS X, google 'cronnix', a graphical crontab editor.
v a d e //
http://homepage.mac.com/doktorp/ doktorp@mac.com
On Sep 4, 2005, at 8:27 PM, rainer kohlberger wrote:
another thing: how to run this script continuously every 15sec? the
pd-'metro' object would be cool for this..
another osx-native way to do it is to run an applescript in the
background, with an endless loop that checks if pd is up and running
and launches it if not.
you can callit from pd via [shell] and [osascript /yourscript.scpt(
r
hi.
finally i've come up to this dirty script:
#!/bin/sh
while [ "forever" ] do ps -x | grep "/Applications/Pd-0.38.4.app" | grep "guiport" > /dev/null || /Applications/Pd-0.38.4.app/Contents/MacOS/Pd & sleep 20 done
you have to write the -open command for the patch to open into .pdrc
the second grep is for deleting the ps-info of the grep itself (as i telled, pgrep is not available)
the script is running until it is killed
r.