April 15, 201214 yr Problems I have: my drives take quite a while to mount, I would guess... four minutes or so. unMenu does not start up automatically I would like Plex to start automatically as well Thanks! #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & # wait for all disks to be mounted, or until timed out... max_wait=300 total_wait=0 sleep_delay=5 num_configured=`grep "disk[0-9]*=" /boot/config/disk.cfg | wc -l` while [ : ] do md_disk_mounted=`mount | grep "/dev/md[0-9]*" | wc -l` [ "$num_configured" = "$md_disk_mounted" ] && break [ $total_wait -gt $max_wait ] && break sleep $sleep_delay (( total_wait += $sleep_delay )) done # Run Plex server at boot echo "/boot/custom/plex/init.sh" | at now # Run unMenu at boot /boot/unmenu/uu cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c update 1: added ' &' after the /uu, thanks BetaQuasi update 2: removed ' &' after the /uu. Added ' | at now' after /uu and /plex/init.sh, thanks Prostuffs! update 3: changed unmenu line to '/boot/unmenu/uu', put max_wait up to 300 seconds (five minutes) thanks Joe! syslog.txt
April 15, 201214 yr Change echo "/boot/unmenu/uu" to: echo "/boot/unmenu/uu &" Actually no, uu will background itself. just change the unmenu and plex lines to echo "/boot/custom/plex/init.sh" | at now echo "/boot/unmenu/uu" | at now
April 15, 201214 yr Author What ever, you've both been helpful! I don't feel alone in my troubles BQ That helped!
April 15, 201214 yr actually, change the line for unmenu to /boot/unmenu/uu and that is all it needs. it will work with the "at" command, but it is completely unnecessary. I should know... since I wrote unMENU, and "uu" you are only waiting a max of 30 seconds for your disks to mount, that might not be enough... I'd increase that 30 seconds max to a number much higher, otherwise you risk the start of plex causing other issues. (perhaps 300 or more might be right) If it is taking 4 minutes for your disks to mount, then you are perhaps not stopping the array cleanly before powering down the server. Joe L.
April 15, 201214 yr Author You're right about not powering it down cleanly. The time (or two) in question, I had bumped the power strip.
Archived
This topic is now archived and is closed to further replies.