QNAP TS-210 Installer


sitnin

Recommended Posts

(UPDATED link & instructions)

I have made an installation package which downloads arm version of btsync, installs it and creates necessary startup scripts and configuration file.

I using it by my own, of course, and for me it works pretty well.

I've attached installer tarball to this post and also you can download the latest version here: http://gregor.ru/fil...p-btsync.tar.gz

Login to ssh as admin and download this tarball into the /root directory,

# cd /root

# curl -O http://gregor.ru/fil...p-btsync.tar.gz

then run:

# tar zxvf qnap-btsync.tar.gz

# cd qnap-btsync

# ./install.sh

After the script finished review /etc/btsync.conf for the WebUI login and password as well as other settings.

Next, you may run btsync as a daemon:

# /etc/init.d/btsync.sh start

Next, proceed to http://YouQnapIp:8888/ for the WebUI and shared folders setup.

Your suggestions and contributions is much appreciated =)

@sitnin

qnap-btsync.tar.gz

Link to comment
Share on other sites

File returns a GET error for me.

I have installed the Linux-ARM variant on a TS-412 (ARM variant with RAID5 array) successfully using the files downloaded from here, autostarting using the instructions on the QNAP Wiki, method 3 specifically.

I did as follows

Copied the btsync_arm.tar.gz file onto my Multimedia share from a PC on my network

SSHed into the QNAP as admin and ran the following blocks:

mkdir /share/MD0_DATA/.qpkg/BTSync

tar xzvf /share/Multimedia/btsync_arm.tar.gz

That gets the application installed into a folder on your NAS. You can run it by typing "/share/MD0_DATA/.qpkg/BTSync/btsync &" and then open http://my_nas_name:8888 to verify it's running.

To autostart it on system reboot, I did as follows, per the autostart wiki:

mkdir /share/MD0_DATA/.qpkg/autorun

cd /share/MD0_DATA/.qpkg/autorun/

nano autorun.sh

chmod +x autorun.sh

Note that for different NAS systems, MD0_DATA may be HDA_DATA instead. I think MD0_DATA only exists when you have a RAID5/6 array.

When editing the file using nano (you may need OptWare QPKG installed first, and need to run "ipkg install nano" to use this editor) put the following lines into it. You can use vi instead of nano if you know what you're doing:

#!/bin/sh

/share/MD0_DATA/.qpkg/BTSync/btsync &

(I'm not sure the "&" is required.)

I then pointed the "real" autostart file (which is stored on the flash and shouldn't be modified frequently) at the one I just created. Note, this varies per the wiki linked above depending on your model and firmware revision. ext4 may be ext2, and dev/mtdblock5 may be different. Be careful!

mount -t ext4 /dev/mtdblock5 /tmp/config

nano /tmp/config/autostart.sh

chmod +x /tmp/config/autorun.sh

umount /tmp/config

The edited file should contain the lines below (only):

#!/bin/sh

/share/MD0_DATA/.qpkg/autorun/autorun.sh &

Finally, I rebooted the NAS, SSHed back in, and checked for the program running at http://my_nas_name:8888. All well!

Good luck to you, no warranty expressed/implied :)

Link to comment
Share on other sites

I installed this using your script. It works great, but when I reboot, both /etc/btsync.conf and /etc/init.d/btsync.sh are missing or deleted. The /usr/local/bin/btsync file is still present though but will not run.

Link to comment
Share on other sites

I installed this using your script. It works great, but when I reboot, both /etc/btsync.conf and /etc/init.d/btsync.sh are missing or deleted. The /usr/local/bin/btsync file is still present though but will not run.

I get this exact same problem.

Seems to work fine on first install, but disappears after reboot.

I used the instructions from sitnin

installed on QNAP TS-212

Link to comment
Share on other sites

Same problem, had to install it manually. The script works nicely but most of the files disappear once you reboot the NAS (TS-412).

Are you able to explain the steps to install manually? Or do I just follow the steps posted by nanotech?

Sorry for the potentially silly questions, completely new to NAS setup and SSH.

Link to comment
Share on other sites

Here is what I did to make it work after reboot. You may need to change some paths according to your model.

1. I placed the btsync binary in /usr/local/bin.


cd /usr/local/bin
wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_arm.tar.gz
tar -zxvf btsync_arm.tar.gz
rm btsync_arm.tar.gz

2. I created a file called btsync.conf in the same folder as the binary file. The following shows what I placed in this file.


{
"device_name": "QNAP Name",
"listening_port": 0,
"storage_path": "/var/spool/btsync",
"pid_file": "/var/run/btsync.pid",
"check_for_updates": true,
"use_upnp": true,
"download_limit": 0,
"upload_limit": 0,
"webui": {
"listen": "0.0.0.0:8888",
"login": "admin",
"password": "password"
}
}

3. I created an autorun.sh file with the following contents.


#!/bin/sh
/share/MD0_DATA/.qpkg/autorun/autorun.sh &

Add above into /tmp/config/autorun.sh file created below.


mount -t ext4 /dev/mtdblock5 /tmp/config
vi /tmp/config/autorun.sh
chmod +x /tmp/config/autorun.sh
echo .
echo "unmounting /tmp/config..."
umount /tmp/config

The above may be different depending on your model. Click here for more information.

4. I created the autorun file with btsync for startup. This file will be run by above script and can be edited without mounting later.


mkdir /share/MD0_DATA/.qpkg/autorun
cd /share/MD0_DATA/.qpkg/autorun/
touch autorun.sh
chmod +x autorun.sh

In this file I have the following


#!/bin/sh
/usr/local/bin/btsync --config /usr/local/bin/btsync.conf

This doesn't have the elegant start/stop script, but for me it's not really necessary as I don't really intend to login and start or stop btsync.

Hope this helps,

Eddie

Link to comment
Share on other sites

I found that is a major issue. Root filesystem on QNAP NAS lives in the RAM, so it's recreated at boot time.

The best approach to handle this, I suppose, will be creating QPKG package for the BTSync.

Unfortunately, it's a bit complicated and will took some time. Will keep you posted.

Link to comment
Share on other sites

I found that is a major issue. Root filesystem on QNAP NAS lives in the RAM, so it's recreated at boot time.

The best approach to handle this, I suppose, will be creating QPKG package for the BTSync.

Unfortunately, it's a bit complicated and will took some time. Will keep you posted.

Excellent, keep up the great work. A simple installer script will be greatly appreciated.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.