Event-Triggered Shell Script
Event-Triggered Shell Script
I have a working module that is triggered by the TicketQueueUpdate event. I tried calling a shell script from my .pm file (tried exec() and system()) but I just can't seem to make it work. The shell script simply writes in a file (for testing purposes in the meantime). Do you have any ideas as to how I can make it work? Thank you very much!
Re: Event-Triggered Shell Script
In case anyone's interested, for some unknown reason (or at least, unknown to me), I couldn't use exec() and system() when the perl script is online. So I tried to find another way and this is what finally made it work:
Note: Even if the pm file is in the same folder as the bash script, I couldn't get it to work with just the relative path.
Thanks everyone for all the help (in my other questions, as well)!
Code: Select all
open DATA, "bash /absolute_path [arg(s)] |" or die "Couldn't execute program: $!";
close DATA;
Thanks everyone for all the help (in my other questions, as well)!
