SmurfKiller Posted November 16, 2018 Share Posted November 16, 2018 I have a custom script that i want to run to control the fans on my unraid host. I created my script, placed it in /root, added an entry to crontab. it worked perfectly until i rebooted. where the script and crontab entry disappeared. Any advice? or tips? is there some unraid way to do this? learning how to create a plugin/create one seems overkill for this.. Quote Link to comment
trurl Posted November 16, 2018 Share Posted November 16, 2018 The OS is in RAM. Only paths on actual Unraid storage (beginning with /mnt) and on the flash drive (beginning with /boot) will survive a reboot. For your specific purpose, take a look at the User Scripts plugin. It will take care of everything except the actual script coding for you. Quote Link to comment
SmurfKiller Posted November 16, 2018 Author Share Posted November 16, 2018 I'll look into the user scripts plugin. I'm using ipmitool to adjust the fan speeds, am i correct to assume that it will also be lost on reboot. Is there a way to install a package that will persist after boot? Or, Is creating my own plugin the only real option? Quote Link to comment
Squid Posted November 16, 2018 Share Posted November 16, 2018 Packages stored in /boot/extra are reinstalled at boot time You might want to look at the IPMI plugin current available. Quote Link to comment
SmurfKiller Posted November 16, 2018 Author Share Posted November 16, 2018 (edited) I tried to put the the txz file in /boot/extra (which i had to create) the file persisted after a reboot but it did not reinstall it. Am i correct to assume that it should be a slackware package file? Regarding the existing IPMI Plugin, it seems its fan control features are just for asrock & supermirco motherboards. i have a dell r510. EDIT: I found this really old post from 2007. is this still the method to add packages? Edited November 16, 2018 by SmurfKiller Quote Link to comment
trurl Posted November 16, 2018 Share Posted November 16, 2018 I don't know for sure if /boot/extra still applies. Its use was supposed to be deprecated at some point. User Scripts plugin might be your best bet. Quote Link to comment
SmurfKiller Posted November 16, 2018 Author Share Posted November 16, 2018 The User Script plugin will work to run the script, but i still need to get ipmitool installed. I know i could check if it is installed and install it from within the script, but that just seems too messy. there has to be a better way. the unraid wiki seems to link to that post from 2007. which i am happy to use, but i just want to know if it is still the correct way to get a package to persist after a reboot. Quote Link to comment
limetech Posted November 16, 2018 Share Posted November 16, 2018 23 minutes ago, SmurfKiller said: I tried to put the the txz file in /boot/extra (which i had to create) the file persisted after a reboot but it did not reinstall it. Am i correct to assume that it should be a slackware package file? Regarding the existing IPMI Plugin, it seems its fan control features are just for asrock & supermirco motherboards. i have a dell r510. EDIT: I found this really old post from 2007. is this still the method to add packages? Highly recommend you don't do that. Instead you can put slackware packages in that 'extra' directory and they will get installed. Another method of installing custom code is to add lines to the 'config/go' file before 'emhttp' is invoked. For example, you can create a directory on your usb flash device called 'private' and put any packages/scripts/etc there. Within Unraid OS, the root of the flash device is mounted at /boot and your private directory will appear as '/boot/private'. To invoke a script store there, edit your 'go' file and add, for example, /boot/private/my-script 1 Quote Link to comment
trurl Posted November 16, 2018 Share Posted November 16, 2018 That old post seems needlessly complex to me. User Scripts can run a script at boot and run other scripts on schedule. You can also put code in the config/go file on flash. That is a script which starts emhttp and is a commonly used place to put additional boot up code. *edit* Tom beat me to it. 1 Quote Link to comment
SmurfKiller Posted November 16, 2018 Author Share Posted November 16, 2018 Just now, limetech said: Another method of installing custom code is to add lines to the 'config/go' file before 'emhttp' is invoked. For example, you can create a directory on your usb flash device called 'private' and put any packages/scripts/etc there. Thanks, that with the User Scripts plugin will do the job 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.