February 2, 201115 yr 2.1 11-28-10 Updated par2 to the 20090203 32bit release. This fixes the failed small par2 repair issue. The par2 problem was already taken care of in the 2.1 dependencies. I believe I even pointed Romir to that same package when I messaged him ask that he updates it with a working par2. Peter
February 2, 201115 yr Yes. The par2 issue is fixed with the current version of the depdency package 2.1. I highly suggest that when new versions of the dependency package are released you should use them.
February 6, 201115 yr Hello, I think that I'm the worst noob that you can meet here ! Actually, I've never used linux. I decide to use unraid as a media + newsgroup server. I'd like to install sabnzb but it's very complicated for someone like me. Does someone can explain to me exactly what to do please? There are plenty of *.tgz or*.gz to download but I don't know how to use them. I made my bootable flash drive I can log at http://tower/ without any problem. My array is done. On my server, i have : rootTower:~# and now, i'm lost. what I have to do now? Thank you
February 6, 201115 yr Hello, I think that I'm the worst noob that you can meet here ! Actually, I've never used linux. I decide to use unraid as a media + newsgroup server. I'd like to install sabnzb but it's very complicated for someone like me. Does someone can explain to me exactly what to do please? There are plenty of *.tgz or*.gz to download but I don't know how to use them. I made my bootable flash drive I can log at http://tower/ without any problem. My array is done. On my server, i have : rootTower:~# and now, i'm lost. what I have to do now? Thank you Here's the wiki entry with the instructions. Install Python based servers
February 9, 201115 yr [removed post from other thread] Since my upgrade to 5.04b and move to AFP, I'm having some trouble with SABnzbd, I have no access to the folders that are created by SABnzbd's post processing. I (newbie) tried this alternative, but could not get SAB to run with the new 2.2 dependencies package. As another option I'm trying to get SAB to run a script to fix the permissions issue. SAB runs the script, but returns a "Request unsuccessful.". The content of my script is as follows: #!/bin/bash chown -R nobody:users "$1" I would be very grateful for any feedback that could help me to get this working. Thanks!
February 9, 201115 yr Are the scripts supposed to return an exit or status code so SabNZBd knows if they worked correctly or not? And you obviously made sure the script is executable (chmod 755 script) ?
February 10, 201115 yr Thanks. Yep, the script is executable, don't think that SABnzbd needs an exit or status code (not sure..).
February 15, 201115 yr Is it possible to run a script in sabnzbd to shutdown my unRAID when the queue is empty? I have powerdown installed. Anyone? I would like to run /sbin/powerdown on end of queue but don't know how i can do this.
February 19, 201115 yr Total newbie here, I used the wiki to install the entire package, and now I can't find a path to where I downloaded my file to. I can seem to get there through a telnet connection, but I can't access it via the cache drive. The path is as follows: /mnt/cache/.custom/sabnzbd/downloads/complete/Movies# All help is appreciated. Thanks
February 20, 201115 yr Can this be bundled up into an unmenu package, so that unmenu can automatically download and install the required packages, and have a config variable for port number to avoid conflicts?
February 20, 201115 yr Can this be bundled up into an unmenu package, so that unmenu can automatically download and install the required packages, and have a config variable for port number to avoid conflicts? Anybody can create a "package.conf" file for unMENU and put it in their /boot/packages directory. Once there, it will be used by the package manager. There are many examples already there... Perhaps you can take a look at the one used for transmission and create a similar one. Joe L.
February 20, 201115 yr Anybody can create a "package.conf" file for unMENU and put it in their /boot/packages directory. Once there, it will be used by the package manager. There are many examples already there... Perhaps you can take a look at the one used for transmission and create a similar one. Joe L. I'm trying that right now. I looked at the ruby package as an example just to create a python package to start with. But I'm getting `Current version='' expected 'Python 2.6.6''.` In my `package.conf` file I have `PACKAGE_VERSION_TEST python --version | awk '{print $1,$2}'`. I also tried `PACKAGE_VERSION_TEST python --version`. When I do `python --version` on the command line, I do get the expected output, but either way unmenu tells me it got an empty string. Do I have to reboot or uninstall a package after each attempt to install it, or can I just reinstall over the top, or will the version output be updated just by viewing the package in unmenu? Is there any documentation or guide for creating `package.conf` files? Cheers.
February 20, 201115 yr Perhaps python is sending the output to stderr, or, more likely, python is not in one of the directories in the search path when you invoked unMENU, so use the full path to python Try: PACKAGE_VERSION_TEST /full/path/to/python --version | awk '{print $1,$2}' or PACKAGE_VERSION_TEST /full/path/to/python --version 2>&1 | awk '{print $1,$2}' To determine the full path to python type: which python Most of the time I've run into this is because the PATH used when starting unMENU through the go script is different then then when logging in on the command line. Joe L.
February 20, 201115 yr Perhaps python is sending the output to stderr, or, more likely, python is not in one of the directories in the search path when you invoked unMENU, so use the full path to python Try: PACKAGE_VERSION_TEST /full/path/to/python --version | awk '{print $1,$2}' or PACKAGE_VERSION_TEST /full/path/to/python --version 2>&1 | awk '{print $1,$2}' To determine the full path to python type: which python Most of the time I've run into this is because the PATH used when starting unMENU through the go script is different then then when logging in on the command line. Joe L. Thanks, Joe. Python was in the path, but the 2>&1 fixed it. This redirects output to stdout? It doesn't seem to matter if i leave off the `awk` part. Is that needed?
February 20, 201115 yr Perhaps python is sending the output to stderr, or, more likely, python is not in one of the directories in the search path when you invoked unMENU, so use the full path to python Try: PACKAGE_VERSION_TEST /full/path/to/python --version | awk '{print $1,$2}' or PACKAGE_VERSION_TEST /full/path/to/python --version 2>&1 | awk '{print $1,$2}' To determine the full path to python type: which python Most of the time I've run into this is because the PATH used when starting unMENU through the go script is different then then when logging in on the command line. Joe L. Thanks, Joe. Python was in the path, but the 2>&1 fixed it. This redirects output to stdout? It doesn't seem to matter if i leave off the `awk` part. Is that needed? The awk part is only needed if you wish to print a specific field of the line that is output from the command. It is not neded unless the output string from the command is wordy and long and contains more than just the version number. And yes, "2>&1" sends the output that is on file descriptor 2 (stderr) to whatever is connected to file descriptor 1 (stdout) instead.
February 20, 201115 yr So I managed to get SAB installed and running on the server. It seems to navigate faster than the version installed in Windows. I followed the instructions here, and never really had an issue. I think this piece of code python /mnt/cache/.custom/sabnzbd/SABnzbd.py -d -s 0.0.0.0:8082 is a little far down the list of steps. I was not able to load the sab conifg page until I ran this and rebooted the server. Maybe I'm the only person that happened to...
February 21, 201115 yr The awk part is only needed if you wish to print a specific field of the line that is output from the command. It is not neded unless the output string from the command is wordy and long and contains more than just the version number. And yes, "2>&1" sends the output that is on file descriptor 2 (stderr) to whatever is connected to file descriptor 1 (stdout) instead. A couple other things I'm a bit confused about is the auto install on reboot, and where to install. Do unmenu packages extract and overwrite the package files to the USB stick on every boot? Or do/should they extract them to a file system that exists in memory (does not persist)? Should I get my install scripts to check if a package has already been extracted (if installing to persistent storage) and skip, if already extracted/installed? Or should I only store the configuration files on persistent storage (the USB stick) and extract the rest of the package on each boot and tell it to use the persistent config files? I don't want to cause unnecessary repetitive writes to the USB stick, and some things will also need only minimal configuration via unmenu and the rest should be done via the app being installed, and it should persist. I'm not sure what the best practices are here. Is installing onto a cache drive ideal? Or is installing onto a data drive also generally OK (if the user doesn't have a cache drive, is there any other persistent storage)? Also is there any supported for automated package dependencies? I had a look at a few examples, but the PACKAGE_DEPENDENCIES line seems to be intended for humans to read rather than for the machine to calculate and install dependencies. Cheers.
February 21, 201115 yr The awk part is only needed if you wish to print a specific field of the line that is output from the command. It is not neded unless the output string from the command is wordy and long and contains more than just the version number. And yes, "2>&1" sends the output that is on file descriptor 2 (stderr) to whatever is connected to file descriptor 1 (stdout) instead. A couple other things I'm a bit confused about is the auto install on reboot, and where to install. Do unmenu packages extract and overwrite the package files to the USB stick on every boot? Or do/should they extract them to a file system that exists in memory (does not persist)? Should I get my install scripts to check if a package has already been extracted (if installing to persistent storage) and skip, if already extracted/installed? Or should I only store the configuration files on persistent storage (the USB stick) and extract the rest of the package on each boot and tell it to use the persistent config files? Lots of good questions. Most packages are "installpkg" format, and those extract themselves to the in-memory file system. That occurs every time you reboot. A few package install some components to the flash drive. Even those can usually be over-written... (Or a warning if they exist, so important user-options might not be overwritten, or older versions copied elsewhere) If you use PACKAGE_VARIABLE "config" variables in the .conf file, the .conf file itself will act as your persistent storage across reboots. You can use those variables to write an apparant persistant file where an application might be looking for it otherwise. I don't want to cause unnecessary repetitive writes to the USB stick, and some things will also need only minimal configuration via unmenu and the rest should be done via the app being installed, and it should persist. I'm not sure what the best practices are here. Is installing onto a cache drive ideal? Or is installing onto a data drive also generally OK (if the user doesn't have a cache drive, is there any other persistent storage)? I've just put a field for install path in those situations. Let the user decide. Also is there any supported for automated package dependencies? I had a look at a few examples, but the PACKAGE_DEPENDENCIES line seems to be intended for humans to read rather than for the machine to calculate and install dependencies. I never built in anything that automatically uses that line. As you said, it is for us humans. It would be nice some-day. I've done some crude checking by simply exiting with a warning if a required component was not in place. You can go one step further and automatically install the dependency if it exists. You can put in the PACKAGE_INSTALLATION section something like this: PACKAGE_INSTALLATION if [ ! -f /path/to/installed/required/dependency ]; then PACKAGE_INSTALLATION if [ ! -f /boot/packages/dependent_package.manual_install ]; then PACKAGE_INSTALLATION echo "Dependent package XYZ has not been installed. Please install it first" PACKAGE_INSTALLATION exit PACKAGE_INSTALLATION else PACKAGE_INSTALLATION /boot/packages/dependent_package.manual_install PACKAGE_INSTALLATION fi PACKAGE_INSTALLATION fi For many packages (transmission as an example) I simply added the lines to download and install the dependency. It installs the Java Run-time, which is also available as a stand-alone package. Fortunately, the package.conf files are not too hard to create, modify, or test. The ".manual_install" and ".auto_install" files they create are simply shell scripts. Joe L.
February 21, 201115 yr I found the script to shutdown all three services, and will be setting that up later. Awesome! Now, once they're shutdown, what commands are used to restart them? Would it be okay just starting what I need, SABnzbd?
February 21, 201115 yr Jeff, right above the link you posted http://lime-technology.com/wiki/index.php?title=Install_Python_based_servers#unMENU_startup_button You can also create 3 files, one for each program if you wanted. Just follow the same file format. Peter
February 21, 201115 yr Jeff, right above the link you posted http://lime-technology.com/wiki/index.php?title=Install_Python_based_servers#unMENU_startup_button You can also create 3 files, one for each program if you wanted. Just follow the same file format. Peter Here, let me slink off into the corner...
February 21, 201115 yr Here, let me slink off into the corner... LOL, I just edited that part last night and did put that shutdown info in there first so maybe you just happened to hit the page at the wrong time... I added that line to start SAB with a different port in the unMENU section. Just not sure if there should be comments like that right at the top. Basically, the instructions rely on you to do the stuff at the top and then reboot. Running the lines that are put in the go stript could start everything without rebooting. Peter
February 21, 201115 yr Links at the top of a wiki that go directly to the pertinent section are great, except when you don't look for another word that might be needed. I did run into trouble though. Maybe you can see what's wrong. First, I took the API key from Config > General and pasted that into the script. #define USER_SCRIPT_LABEL Stop Python #define USER_SCRIPT_DESCR Stop the Python Programs SAB, SickBeard and CouchPotato # # stop SAB wget -q --delete-after http://192.168.3.175:8082/shutdown?session=7afdbe2686803bed3d949f5434881a94 # # stop SickBeard wget -q --delete-after http://192.168.3.175:8081/home/shutdown/ # # Stop CouchPotato wget -q --delete-after http://192.168.3.175:8083/config/exit/ I'm not using Couch or Sick, so I have no problem commenting those out if there's no ill effect. You can see I added # to Sick and Couch. Here's the start: #define USER_SCRIPT_LABEL Start Python #define USER_SCRIPT_DESCR Start the Python Programs SAB, SickBeard and CouchPotato python /mnt/cache/.custom/sabnzbd/SABnzbd.py -d #python /mnt/cache/.custom/sickbeard/SickBeard.py --daemon #python /mnt/cache/.custom/couchpotato/CouchPotato.py -d I actually had to restart the server for this script to appear on the User Scripts page. I thought that was weird as the stop script appeared with an F5 press. When I press each button on the User Scripts page, the page does refresh, and changes to http://tower:8080/user_scripts?command=Start+Python or http://tower:8080/user_scripts?command=Stop+Python. I see no changes in the syslog. It's easy enough to load the SAB page and click shutdown there to stop the cache drive from spinning, so that's bottom on the list. Preventing the other from starting would be a major plus. I'm thinking I can just add # to the Sick and Couch lines? My go script: #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & /boot/unmenu/uu cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c # determine if cache drive online, retry upto 7 times for i in 0 1 2 3 4 5 6 7 do if [ ! -d /mnt/cache ] then sleep 15 fi done # If Cache drive is online, start SABnzbd, Sickbeard, and CouchPotato if [ -d /mnt/cache ]; then cd /mnt/cache/.custom installpkg /boot/packages/SABnzbdDependencies-2.1-i486-unRAID.tgz python /mnt/cache/.custom/sabnzbd/SABnzbd.py -d -s 192.168.3.175:8082 python /mnt/cache/.custom/sickbeard/SickBeard.py --daemon python /mnt/cache/.custom/couchpotato/CouchPotato.py -d fi
February 21, 201115 yr I don't follow what your problem is. If you don't want to use the scripts for all 3 programs then comment or delete the unwanted ones like you alluded to. Same with the go stript, just comment or delete the lines if you don't want them to start at boot. You can also use the same script format and create 3 seperate scripts to start each individually and 3 seperate scripts to stop each individually. For example, to stop SAB only use this code saved as a file called 10-unmenu_user_script_stop_SABnzbd. #define USER_SCRIPT_LABEL Stop SABnzbd #define USER_SCRIPT_DESCR Stop the Python Program SABnzbd # # stop SAB wget -q --delete-after http://192.168.3.175:8082/shutdown?session=7afdbe2686803bed3d949f5434881a94 Break out the other programs similarily to create scripts just for them. FYI, nothing will appear in the syslog when you stop and start. The program just won't work when it's stopped. Someone else here came up with these commands to stop the programs. I just threw them into the script and added it onto the Wiki page. If they don't work then it could be because you used a dos based editor. You have to use one with Unix end of lines (I think a character return only). I often load up Midnight Commander (type mc at the command prompt) and open the files there to make sure they are correct. Delete the funny ^m codes on the ends of the lines if they are there. Peter
Archived
This topic is now archived and is closed to further replies.