iarp Posted December 30, 2012 Share Posted December 30, 2012 I'm trying to figure out how to run a set of commands whenever the shutdown or reset buttons are pressed on the main GUI that ships with unraid. I know there is the powerdown script system, but that requires knowledge of logging in via telnet and such, something i know they can't do. I'm also unsure if that, by installing powerdown, does that override whatever command the shutdown/restart buttons activate in the system? I copied emhttp to my computer in hopes of being able to view the scripts and modify what i need to modify but it would see that it's an application and not a bash script. Quote Link to comment
Joe L. Posted December 30, 2012 Share Posted December 30, 2012 I'm trying to figure out how to run a set of commands whenever the shutdown or reset buttons are pressed on the main GUI that ships with unraid. I know there is the powerdown script system, but that requires knowledge of logging in via telnet and such, something i know they can't do. I'm also unsure if that, by installing powerdown, does that override whatever command the shutdown/restart buttons activate in the system? I copied emhttp to my computer in hopes of being able to view the scripts and modify what i need to modify but it would see that it's an application and not a bash script. Without knowing which version of unRAID you are running, we cannot give any answer. In the 5.0-rc series, there is a script you can hook into at /usr/local/sbin/emhttp_event emhttp has a number of events that call the emhttp_event script, and it in turn can invoke other scripts. There is no documentation, and you are on your own as it is a customization. You'll need to replace the script each time you reboot, as it is in RAM. Joe L. Quote Link to comment
iarp Posted December 30, 2012 Author Share Posted December 30, 2012 The machine is running unraid 4.7 Quote Link to comment
Joe L. Posted December 30, 2012 Share Posted December 30, 2012 The machine is running unraid 4.7 There is no equivalent. emhttp has no event system in 4.7 and prior. Best you can do is use a script similar to one I created named unraid_addon_control.sh you can see it described here in this thread: http://lime-technology.com/forum/index.php?topic=5686.msg53271#msg53271 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.