April 27, 201313 yr Hi, I am new to unraid (bought pro key 3 days ago), and spent the last week reading wiki and hundreds threads I think I well understand the big picture. I have one thing I would like to do. Run the mover script at shutdown. My unraid use is not 24/24. I only need it running from late afternoon to late evening. I read this thread. I understand the warnings, but still want to do it and the thread do not explain how to do it. I wanted to add the call to mover just before unraid stop like this in /usr/local/sbin/powerdown: ..... trap "rm -f /var/run/powerdown.pid" EXIT HUP INT QUIT #+++++++++++++++++++ /usr/local/sbin/mover /etc/rc.d/rc.unRAID stop # /sbin/poweroff logger "Initiating Shutdown with ${1}" /sbin/shutdown -t5 ${OPT} now Is this the right line to insert the call? Also as I understand how unraid works, I need to keep a copy of the modified script in home directory, then copy it over the existing one in the go script, is this correct? thanks, TB
April 27, 201313 yr Mover runs as a background process so it is not going to do what you want as it will promptly be killed by the shutdown process. If you know roughly what time period you will have the server switched on for, why not simply change the time that mover is scheduled to run automatically to be somewhere near the end of that period?
April 27, 201313 yr Author thanks for you answer. Because humans are not robots If I set a fixed time, inevitably some times the server will be already shutfdown automatically because nobody use it and some times unraid will be heavily used at the time the mover run.
April 27, 201313 yr The other thing to consider, if you run your system from a UPS - you don't want a UPS-controlled shutdown to be delayed by your mover process.
April 27, 201313 yr Why not create a script, that first calls mover and when complete calls shutdown? That way the shutdown command works just find for UPS and other emergency proceedures but whatever hes using to shut down the system (cron, button or telnet command) can just call on the custom script first. What do y'all think?
April 27, 201313 yr Why not kick off mover on startup instead? That would essentially accomplish the same overall effect and not need to worry about interfering with shutdown.
April 27, 201313 yr Why not kick off mover on startup instead? That would essentially accomplish the same overall effect and not need to worry about interfering with shutdown. Only issue I see with this is, if youre starting up the server its because you want to watch something. If it starts moving then, you may have slowdown problems.
April 27, 201313 yr Why not kick off mover on startup instead? I'd guess that the intention is that it runs when the server isn't in prime time use. Mover can certainly cause a slow-down in normal network serving activity.
April 27, 201313 yr Author Mover runs as a background process so it is not going to do what you want as it will promptly be killed by the shutdown process. I have some basics unix skills. Mover seems to be only a bash script, not a daemon. The actual "shutdown" is called at the end. Will this not ensure that the move process completes before calling /etc/rc.d/rc.unRAID and /sbin/shutdown?
Archived
This topic is now archived and is closed to further replies.