General NAS-Central Forums

Welcome to the NAS community
It is currently Sat Dec 16, 2017 9:08 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Sep 13, 2013 1:11 am 
Offline
User avatar

Joined: Wed Sep 11, 2013 11:38 am
Posts: 3
I recently bought a ix4-300d to store my media and manage torrent downloads. To say the built in torrent client is a total disappointment is a bit of an understatement. I was also left unhappy with the lack of downloadable modules available as I assumed transmission server was only a click away. So, I had to do it the hard way. A bit of research and some translation and debugging resulted in success. As well as transmission, I was able to install a few other utilities that I am still figuring out. I am posting what I did here so that anybody with a basic grasp of linux can easily get as far as me. Don't expect me to answer too many queries, I am often away from home in areas with little or no internet for long periods of time hence setting up the server at home to be accesed remotely. I will refer to accessing the NAS as 'http://nas' but you will need to substitute the IP address or hostname you have chosen. Once completed you will have the following modules installed:

Transmission http://nas:9091/
SABnzbd http://nas:8080/sabnzbd/
Sick-Beard http://nas:8081/home/
CouchPotatoServer http://nas:5050/
Headphones http://nas:8181/home/
AutoSub http://nas:8083/home/

Please be aware that mistakes can lead to bricking your server and that installing the modules and getting them running is just the beginning, each one will require some fine tuning in the settings and that some settings can only be changed by editing the respective config file.

Note: AutoSub currently isn't working for me and I have no clue why. It is not important to me either as I don't need subtitles.

To get up and running, the folowing steps were taken.
1. Create a downloads share
2. Enable SSH
3. Create a folder to place the apps and settings, Install IPKG, Install transmission + dependencies and apps
4. Create a startup script to run the apps and test them
5. Add the startup script to the boot process

1. Create a downloads share:
Go to http://nas/manage/shares.html and add a share named 'Downloads' (note capital 'D')

2. Enabling SSH:
http://nas/manage/diagnostics.html or http://nas/diagnostics.html will get you to the page to do this. Enable SSH, choose a root password and apply. Download putty or some other SSH client and open an SSH terminal as root (use NAS hostname or IP and port 22). Password=soho+password of your choice. Once logged in enter the 'passwd' command to change the password to something that doesn't have 'soho' in it.

3. Setting up folders and installing apps
I created a script to set everything up.
Code:
nano /opt/installer.sh

Paste the following:
Code:
#!/bin/sh
PATH=$PATH:/opt/bin
python=/opt/bin/python2.6
apps=/mnt/pools/A/A0/apps
feed=http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
ipk_name=$(wget -qO- $feed/Packages | awk '/^Filename: ipkg-opt/ {print $2}')
dload=/mnt/pools/A/A0/Downloads
mkdir $apps
mkdir $apps/_config
mkdir $apps/_config/autosub
mkdir $apps/_config/couchpotato
mkdir $apps/_config/headphones
mkdir $apps/_config/transmission
mkdir $dload/_watch
mkdir $dload/_incomplete
wget $feed/$ipk_name
tar -xOvzf $ipk_name ./data.tar.gz | tar -C / -xzvf -
mkdir -p /opt/etc/ipkg
echo "src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable" >> /opt/etc/ipkg/armel-feed.conf
echo "src native http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/native/unstable" >> /opt/etc/ipkg/armel-feed.conf
rm ipkg*.ipk
/opt/bin/ipkg update
/opt/bin/ipkg install python26 py26-cheetah py26-openssl par2cmdline unrar unzip git gcc transmission
cd $apps
/opt/bin/git clone https://github.com/sabnzbd/sabnzbd.git
/opt/bin/git clone https://github.com/bricky/Sick-Beard.git Sick-Beard
/opt/bin/git clone https://github.com/RuudBurger/CouchPotatoServer.git
/opt/bin/git clone https://github.com/rembo10/headphones.git
wget http://auto-sub.googlecode.com/files/auto-sub.Beta.0.5.7.zip
/opt/bin/unzip auto-sub.Beta.0.5.7.zip
rm auto-sub.Beta.0.5.7.zip
wget http://www.golug.it/pub/yenc/yenc-0.4.0.tar.gz
tar zxvf yenc-0.4.0.tar.gz
cd yenc-0.4.0
$python setup.py build
$python setup.py install
cd ..
rm -rf yenc-0.4*
CTRL-X to exit nano (save changes) Then make the script executable and run it.
Code:
chmod +x /opt/installer.sh
/opt/installer.sh
4. Now for the startup script
Code:
nano /opt/init-opt.sh
Paste the following
Code:
#!/bin/sh
python=/opt/bin/python2.6
apps=/mnt/pools/A/A0/apps
logfile=/opt/init-opt.log
rm $logfile
echo "Last bootup:" >> $logfile
date >> $logfile
echo "Wait one minute for storage to be mounted" >> $logfile
sleep 1m
echo "Adding /opt/bin to $PATH" >> $logfile
PATH=/opt/bin:$PATH
echo "Starting transmission-daemon" >> $logfile
transmission-daemon -g /mnt/pools/A/A0/apps/_config/transmission --allowed *.*.*.*
echo "Starting SABnzbd" >> $logfile
$python $apps/sabnzbd/SABnzbd.py -f/mnt/pools/A/A0/apps/_config/sabnzbd/sabnzbd.ini --server 0.0.0.0 --daemon
echo "Starting SickBeard" >> $logfile
$python $apps/Sick-Beard/SickBeard.py --config /mnt/pools/A/A0/apps/_config/sickbeard/config.ini --daemon
echo "Starting Headphones" >> $logfile
$python $apps/headphones/Headphones.py -d --config /mnt/pools/A/A0/apps/_config/headphones/config.ini
echo "Starting CouchPotatoServer" >> $logfile
$python $apps/CouchPotatoServer/CouchPotato.py --data_dir /mnt/pools/A/A0/apps/_config/couchpotato/ --daemon
echo "Starting AutoSub" >> $logfile
$python $apps/auto-sub/AutoSub.py -d -c/mnt/pools/A/A0/apps/_config/autosub/config.properties
echo "I will reboot after 365 days..." >> $logfile
sleep 365d
reboot
CTRL-X to exit nano (save changes) Then make the script executable.
Code:
chmod +x /opt/init-opt.sh
You can start all the modules by entering
Code:
/opt/init-opt.sh
You can then check each app and once you are happy that everything is running, you can make them run automatically when rebooting.

5. Adding the startup script to the boot process
In order to do this we need to create a script to edit the NAS boot script sohoProcs.xml.
Code:
nano /opt/edit_sohoProcs.sh
Paste the folllowing:
Code:
#!/bin/sh
mknod -m0660 /dev/loop3 b 7 3
chown root.disk /dev/loop3
mkdir /tmp/apps
mount -o loop /boot/images/apps /tmp/apps
nano /tmp/apps/usr/local/cfg/sohoProcs.xml
sleep 1
umount /tmp/apps
rm /dev/loop3
Make executable and run.
Code:
chmod +x /opt/edit_sohoProcs.sh
/opt/edit_sohoProcs.sh
Find the line <Group Level="1"> and then scroll down carefully until you come to a line that reads </Group>. Just above this line, insert the following:
Code:
<Program Name="init-opt.sh" Path="/opt/init-opt.sh">
  <SysOption Restart="-1"/>
</Program>
CTRL X and exit nano saving the changes. Now the modules should startup on every reboot. Note that some patience will be required, it takes about 4 minutes to boot my NAS and yours could take longer. The sohoProcs.xml file will get overwritten after a firmware update so be prepared to repeat the last step. http://tbg.iblocklist.com/Lists/ipfilter.dat.gz is a good source for a blocklist.
Have Fun!

_________________
Iomega StorCenter ix4-300d
Instantly get 20GB of cloud storage https://copy.com?r=gvPfNQ


Top
 Profile  
 
PostPosted: Fri Oct 18, 2013 10:28 pm 
Offline

Joined: Fri Oct 18, 2013 10:25 pm
Posts: 2
Thank you for a great manual!
What is the right way to clean everything? I mean return IX to the state it was before the installation of all the apps/
Thank you in advance


Top
 Profile  
 
PostPosted: Tue Feb 04, 2014 7:30 pm 
Offline

Joined: Tue Feb 04, 2014 7:20 pm
Posts: 1
Hello,

I am new to Iomega NAS,

I had one PX6-300d, which I found is very similar to others.

I need to make changes in sohoProcs.xml,
I use the scritp for that, but, I receive "readonly filesystem", and cant write.

Theres something that I can do to solve this?

Thanks

Job Diogenes


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group