LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   seeking howto run script when various events happen (https://www.linuxquestions.org/questions/linux-software-2/seeking-howto-run-script-when-various-events-happen-4175536445/)

SaintDanBert 03-11-2015 05:42 PM

seeking howto run script when various events happen
 
Is there an existing utility {suite} that will let me do the following:
  • on mount {filesystem} run {script}
  • on un-mount {filesystem} run {script}
  • when {folder} content changes run {script}
  • when {file} content changes run {script}
  • on connect to {SSID} run {script}
  • on disconnect from {SSID} run {script}
  • on connect to {ethN} run {script}
  • on disconnect from {ethN} run {script}
  • ... and so on ...
  • cron handles time and date based events

I'm hoping for something that is more like cron than systemd.

I used to see all sorts of articles about this sort of thing but then we got more and more-complex subsystems doing action-on-event processing and the end-user options for doing this are not as obvious -- to me.

Thanks in advance,
~~~ 0;-Dan

kbp 03-12-2015 08:34 PM

I'm not aware of anything that will do it all .. there are several tools that can handle parts such as inotifywait for directory content changes and plugd for network connect/disconnect

Maybe we should start a small project ..

SaintDanBert 03-13-2015 12:05 PM

Quote:

Originally Posted by kbp (Post 5331293)
I'm not aware of anything that will do it all .. there are several tools that can handle parts such as inotifywait for directory content changes and plugd for network connect/disconnect

Maybe we should start a small project ..

If there are multiple tools, each that handle part of my requirements, we might need one project "... to rule them all, and in the darkness bind them ..." (sorry)

Sadly, I think that the 'systemd' folks have already co-opt-ed the do-everything when events happen problem. I'm interested in end-user, get-my-work-done, user-level do-something-on-event processing.

I'll draft a Blueprint document...

Thanks for the reply,
~~~ 0;-Dan

SaintDanBert 10-16-2015 02:42 PM

I finally -- FINALLY -- found a solution to what I want to do.
Use INCRON for actions

I have not made this work like I want ... yet ... but it should meet my requirements based on what it written on the tin.

Thanks, again,
~~~ 0;-Dan


All times are GMT -5. The time now is 03:28 AM.