TheStapler Posted August 25, 2012 Share Posted August 25, 2012 Ok, not sure how to put the "topic title", besides what I put... anyways... I installed my Cache Drive, before how I had it, I had an "extra" drive that I used for my SAB and SickBeard... but I thought I would try and stop writing to the array all the time, and use the cache drive feature. So, I have my "cache only" share, that I have my SAB and SickBeard in now, and it runs perfectly... but now, when I go to reboot my machine, or stop the array from the SimpleFeatures front end, it wont do it becuase I have my Python processes running. Is there a way that I can put my "/etc/rc.d/unraid_scripts/unraid.rc.d_sabnzbd stop" as well as the "start" for when the array is being started and stopped? Just curious as to where I should be looking... I was looking at the "clean_powerdown" script, but that is for shutting down the server, no? Any help would be appreciated! TheStapler!! Link to comment
lainie Posted August 25, 2012 Share Posted August 25, 2012 Look near the bottom of this page http://lime-technology.com/wiki/index.php/Install_Python_based_servers for unMENU shutdown button. It is not exactly what you are asking for, but I think it might work close enough to accomplish it. This page's instructions is how I originally installed SAB & Sick. I used the unmenu script, but it was a little inconvenient to try to remember to click the shutdown python button when stopping my array. I switched to using Influencer's plugins & no longer needed to shut them down via unmenu (as his plugins stop themselves / do not prevent my array from being stopped). Link to comment
TheStapler Posted August 26, 2012 Author Share Posted August 26, 2012 is there no way to add something to the script that gets called when you stop the array? just out of curiousity, where would I even find that script that starts/stops the array?? also, my start/stop script, is a little different, but i like the one you linked... here is mine... which I think I am gonig to change now... case $1 in start) if test -e /etc/rc.d/unraid.d/rc.unraid_sickbeard -a $(ps auxwww|grep SickBeard.py|grep -v grep|wc -l) -lt 1; then if [ -d /mnt/cache/apps/sickbeard ]; then cd /mnt/cache/apps/sickbeard/ su nobody -c "python SickBeard.py --daemon > /dev/null 2>&1" echo Sick Beard started. else echo Sick Beard could not be started because the installation directory, /mnt/cache/apps/sickbeard, could not be found. echo If Sick Beard is installed to the unRAID array and the unRAID array is stopped, run \"/etc/rc.d/unraid.d/rc.unraid_sickbeard start\" to start Sick Beard once the unRAID array is started. fi else echo Sick Beard is already started. fi ;; stop) if test -e /etc/rc.d/unraid.d/rc.unraid_sickbeard -a $(ps auxwww|grep SickBeard.py|grep -v grep|wc -l) -gt 0; then kill -9 $(ps auxwww|grep SickBeard.py|grep -v grep|awk '{ print $2 }') sleep 4 echo Sick Beard stopped. else echo Sick Beard is already stopped. fi ;; esac Link to comment
lainie Posted August 26, 2012 Share Posted August 26, 2012 As far as I know, there is not a way to modify the Stop Array button to add other scripts. Others may be able to tell you of something I am not aware of... You can control unRAID from the command line. This includes stopping the array. Instructions here http://lime-technology.com/wiki/index.php/Console#To_cleanly_Stop_the_array_from_the_command_line. You could probably script something to initiate the stop & call your script. However, if it is SABnzbd, SickBeard & CouchPotato that are keeping your array from stopping... let me direct you to the plugins by Influencer found on this thread: http://lime-technology.com/forum/index.php?topic=21260.0. His plugins actually shut down when you try to stop your array using the Stop Array button (without any extra shenanigans needed) & come back once it is restarted. He keeps them updated & he actively supports his plugins in this thread. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.