Auto run when usb is mounted

Status
Not open for further replies.

Paul5

Contributor
Joined
Jun 17, 2013
Messages
117
Any chance of having an auto run function when a USB is inserted and mounted by FreenNas.

FreeNas already auto mounts USB's I just need it to auto run a script in the USB straight after it's mounted.

In my case. Poor mans UPS shutdown. I have an old UPS that I tried to connect to Freenas via serial trying different drivers. My reward, a fully corrupted Freenas, the screen looked like the Matrix on steroids. Don't ask me how it happened.

All I need to do is have a relay on the old UPS, when power fails and the UPS takes over, the relay completes the circuit which powers the usb. Freenas sees it as newly inserted and mounts it, the script runs telling freenas to shutdown in X seconds.

Others would find and auto run feature of use for something (quick back up of config files?). So it would be nice to have the option.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
I have an old UPS that I tried to connect to Freenas via serial trying different drivers. My reward, a fully corrupted Freenas, the screen looked like the Matrix on steroids.
What's the UPS? You may not have had the correct serial cable for it.
 

Paul5

Contributor
Joined
Jun 17, 2013
Messages
117
What's the UPS? You may not have had the correct serial cable for it.

That's a good point I might have to see if I can find another one from somewhere.

The UPS - It's an MLA BS-1200 judging by the electronics I would say it's from the 90's
 
Status
Not open for further replies.
Top