Skip to content

Instantly share code, notes, and snippets.

@nzbjamz

nzbjamz/howto.md Secret

Last active December 10, 2021 12:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nzbjamz/183cfa1cefbba812fa8f94744b947f8f to your computer and use it in GitHub Desktop.
Save nzbjamz/183cfa1cefbba812fa8f94744b947f8f to your computer and use it in GitHub Desktop.

How to setup QNAP TS-251+

  1. Go to the QNAP Control Panel and disable the network recycle bin and expanded media functionality

  2. Go to the QNAP FileStation settings and disable folder thumbnails

  3. In the QNAP AppCenter install

  1. ssh into the TS-251+

ssh -l admin <QNAP_SERVER_NAME_OR_IP>

admin@<QNAP_SERVER_NAME_OR_IP> password: <QNAP_PASSWORD>


1. Add `CURL_CA_BUNDLE` environment variable to Entware’s `etc/profile`<br>
   ```shell
echo "export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt" >> /share/CACHEDEV1_DATA/.qpkg/Entware-ng/etc/profile
  1. Start Entware. Note: Once Entware is started /opt should symlink to /share/CACHEDEV1_DATA/.qpkg/Entware-ng/

/share/CACHEDEV1_DATA/.qpkg/Entware-ng/Entware-ng.sh start


1. Update the `opkg` package manager’s listings
   ```shell
opkg update
  1. Remove python references from
  • Entware’s bin and lib folders of
    /share/CACHEDEV1_DATA/.qpkg/Entware-ng/

  • QCouchPotato’s bin, include, and lib folders of
    /share/CACHEDEV1_DATA/.qpkg/QCouchPotato

  • /usr/local/bin

  1. Remove mv from QSabNZBdPlus

rm /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/mv


1. Create symlinks to QSabNZBdPlus’ `bin/python`, `include/python2.7`, and `lib/python2.7` folders
    for Entware-n, QCouchPotato, and `usr/bin`. This is a bit of rinse and repeat.
    I should convert this into a bash script.
   ```shell
cd /share/CACHEDEV1_DATA/.qpkg/QCouchPotato
cd bin
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python python
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2 python2
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2.7 python2.7
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python-config python-config
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2-config python2-config
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2.7-config python2.7-config
cd ../include
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/include/python2.7 python2.7
cd ../lib
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/lib/python2.7 python2.7

cd /share/CACHEDEV1_DATA/.qpkg/Entware-ng
cd bin
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python python
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2 python2
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2.7 python2.7
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python-config python-config
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2-config python2-config
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2.7-config python2.7-config
cd ../include
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/include/python2.7 python2.7
cd ../lib
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/lib/python2.7 python2.7

cd /usr/bin
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python python
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2 python2
ln -s /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/bin/python2.7 python2.7
  1. Install sickbeard_mp4_automator prerequesites

opkg install python-dev python-pip ffmpeg ffprobe git mc opkg install gcc python-cffi pip install requests pip install "requests[security]" pip install requests-cache pip install babelfish pip install "subliminal<2" pip uninstall stevedore pip install stevedore==1.19.1 pip install qtfaststart


1. Install sickbeard\_mp4\_automator
   ```shell
cd /share/CACHEDEV1_DATA/
git clone --depth=1 git://github.com/mdhiggins/sickbeard_mp4_automator ./scripts
cd scripts
cp autoProcess.ini.sample autoProcess.ini
  1. From QTS stop and restart Sab first, then Couch and Sonarr packages

  2. In your shell edit autoProcess.ini with the mc or vi. Bellow are just the entries I modified.

[Sonarr] ssl = 1 apikey =

[MP4] ffmpeg = /opt/bin/ffmpeg ffprobe = /opt/bin/ffprobe audio-default-language = eng subtitle-language = eng subtitle-default-language = eng convert-mp4 = True tag-language = eng download-subs = True permissions = 0644

[CouchPotato] apikey = delete-failed = True

[SABNZBD] sonarr-category = tv couchpotato-category = movies

[Plex] token =


1. Configure Sab, then Couch and Sonarr.<br>
   Make sure Sab’s script folder points to `/share/CACHEDEV1_DATA/scripts/`

## Helpers

You might also want to install
```shell
opkg install file mediainfo

⚠️️ Notice

There’s an issue with QSabNZBdPlus’ par2cmdline.
Apply this path to /share/CACHEDEV1_DATA/.qpkg/QSabNZBdPlus/SABnzbd/sabnzbd/newsunpack.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment