February 3, 20197 yr I need to run a few commands on the terminal as root every time the system starts up to load the integrated graphics driver for plex hardware transcoding. The commands are pretty simple, just: modprobe i915 chown -R nobody:users /dev/dri chmod -R 777 /dev/dri In the past (distant) I've achieved that by putting something in /etc/init.d however with Unraid, that doesn't exist and besides probably wouldn't work as the file system is loaded from the USB. So what's the best-practice way to achieve this in Unraid. Ideally I'd like not to have to re-do this every time I update Unraid. Thanks in advance.
February 3, 20197 yr 9 minutes ago, dgwharrison said: I need to run a few commands on the terminal as root every time the system starts up to load the integrated graphics driver for plex hardware transcoding. The commands are pretty simple, just: modprobe i915 chown -R nobody:users /dev/dri chmod -R 777 /dev/dri In the past (distant) I've achieved that by putting something in /etc/init.d however with Unraid, that doesn't exist and besides probably wouldn't work as the file system is loaded from the USB. So what's the best-practice way to achieve this in Unraid. Ideally I'd like not to have to re-do this every time I update Unraid. Thanks in advance. Just put them in your go file (or in a script executed by the User Scripts plugin). That's where you put commands you want executed on boot. I have the same commands in my go file for Plex HW transcoding. Edited February 3, 20197 yr by Hoopster
February 3, 20197 yr Since you want those commands executed before Plex starts up, you want them in the go file (/boot/config/go). If they didn't have to be executed before Plex then user scripts would be able to handle it (user scripts doesn't execute any commands at array startup until after all services (ie: docker and vms) are started)
February 3, 20197 yr 8 minutes ago, Squid said: user scripts doesn't execute any commands at array startup until after all services (ie: docker and vms) are started Good point. I forgot about that detail. 👍
February 3, 20197 yr Just now, Hoopster said: Good point. I forgot about that detail. 👍 And I'm not honouring any feature req's to change that behaviour either
February 3, 20197 yr Author 5 hours ago, Squid said: Since you want those commands executed before Plex starts up, you want them in the go file (/boot/config/go). If they didn't have to be executed before Plex then user scripts would be able to handle it (user scripts doesn't execute any commands at array startup until after all services (ie: docker and vms) are started) Hi @Squid, thanks for the reply. I tried searching the wiki for a bit of info on the go file but can't find anything. Reason is the file doesn't exist, so do I just create it as root, chmod to 755 and insert my commands in it?
February 3, 20197 yr Author disregard... I failed, my ssh session had closed... /boot/config/go does exist and it's 777 modded.
February 3, 20197 yr 4 hours ago, dgwharrison said: disregard... I failed, my ssh session had closed... /boot/config/go does exist and it's 777 modded. Keep in mind that the /boot tree is a mount of the FAT32 USB stick, which does NOT allow full linux permissions, etc. If for a future project you need that sort of thing, you will have to work around it by moving things into the root file system and applying what you need there until the array volumes are mounted.
February 3, 20197 yr 10 hours ago, dgwharrison said: Hi @Squid, thanks for the reply. I tried searching the wiki for a bit of info on the go file but can't find anything. Reason is the file doesn't exist, so do I just create it as root, chmod to 755 and insert my commands in it? If you export the flash drive (should be secure or private), it just shows up as a folder you can edit from your PC/Mac/etc. Any time I want to edit the go file, I just open it from the flash share in Windows and modify it with Notepad or Notepad++
Archived
This topic is now archived and is closed to further replies.