[support] How to run a script when a node is added for a custom module
Gordon Heydon
gordon at heydon.com.au
Fri Aug 27 00:43:03 UTC 2010
Hi,
the best approach is to use hook_nodeapi() http://api.drupalecommerce.org/api/function/hook_nodeapi/6 to trigger the update, and the you can exec() the script or even use the ssh2 extension to communicate directly with the other server. Or you could write a script that will monitor a directory and do something like the cdn module to move transfer the file.
Gordon.
On 27/08/2010, at 9:32 AM, Sarah Vardy wrote:
> I am currently developing a module for the audio module to enable RTMP streaming and FFMPEG encoding.
>
> I am wondering what the best approach is to run the scp command (like flash video) when an audio node is added (to add the file to an RTMP server)? Can I use hook_form_alter to run this command? I am looking through the Drupal API at the moment. I also want to run an ffmpeg command as well when the node is added to encode the media for storage on the rtmp server.
>
> Any help or suggestions would be much appreciated.
>
> Cheers,
>
> scarer
> --
> [ Drupal support list | http://lists.drupal.org/ ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100827/f9d49c1d/attachment.html
More information about the support
mailing list