November 16, 20187 yr 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..
November 16, 20187 yr Community Expert 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.
November 16, 20187 yr Author 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?
November 16, 20187 yr Packages stored in /boot/extra are reinstalled at boot time You might want to look at the IPMI plugin current available.
November 16, 20187 yr Author 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, 20187 yr by SmurfKiller
November 16, 20187 yr Community Expert 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.
November 16, 20187 yr Author 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.
November 16, 20187 yr 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
November 16, 20187 yr Community Expert 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.
November 16, 20187 yr Author 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
Archived
This topic is now archived and is closed to further replies.