Tag: entware

Entware and pyLoad on Android 7.1 TV Box

Description:
Entware is repository full of apps for embeded linux like android on tv box. I have prepared installation script to install it from scratch because android is different. You have to rebuild folders in root on every reboot. Root partition is rebuilt on every boot from the image. I will use /data partition to store files (path /data/opt) and mount –bind on /opt.

Continue reading

Aria2 on Asus Router with AsusWRT Merlin

Built-in Download Master from Asus is not very good. So you can install Entware and Aria2 Download manager on your router. You have to connect USB hard drive but first create and Linux partition on it (recommended ext4). On Windows you can use MiniTool Partition Wizard on linux just use GParted. You can shrink main partition and create second with ext4 or ext3 file system.

  • Enable SSH in Administration > System > Enable SSH > LAN Only
  • Log in with Putty on Windows or terminal on Linux toy your router via SSH and run script and put number of tour partition (remember to create ext4). Login and password is the same for admin in web panel.
    entware-setup.sh

  • Install Aria2, lighttpd and certificates to support SSL and php (not necessary for this gui)
    opkg install aria2 ca-bundle ca-certificates lighttpd lighttpd-mod-fastcgi php7-fastcgi
  • Install WEB GUI for Aria2:
    wget -c -O /opt/tmp/webui-aria2.zip https://github.com/ziahamza/webui-aria2/archive/master.zip --no-check-certificate
    unzip /opt/tmp/webui-aria2.zip -d /opt/tmp/
    rm /opt/tmp/webui-aria2.zip
    mv /opt/tmp/webui-aria2-master /opt/share/www/aria2
  • Configure lighttpd for php and port 81:
    sed -i 's/#server.port = 81/server.port = 81/g' "/opt/etc/lighttpd/lighttpd.conf"
    sed -i "/server.upload-dirs*/cserver.upload-dirs = ( \"/opt/tmp\" )" "/opt/etc/lighttpd/lighttpd.conf"
    cat >> /opt/etc/lighttpd/conf.d/30-fastcgi.conf << EOF server.modules += ( "mod_fastcgi" ) fastcgi.server = ( ".php" =>
    ( "localhost" =>
    ( "socket" => "/tmp/php-fcgi.sock",
    "bin-path" => "/opt/bin/php-fcgi",
    "max-procs" => 1,
    "bin-environment" =>
    ( "PHP_FCGI_CHILDREN" => "2",
    "PHP_FCGI_MAX_REQUESTS" => "1000" )
    )
    )
    )
    EOF
  • Edit configuration of Aria2 in /opt/etc/aria2.conf. If you create a small partition with ext4 you should change download directory to main partition (it should be sub-directory for example Downloads):
    dir=/mnt/Partition/Downloads
  • Run aria2 and lighttpd:
    /opt/etc/init.d/S81aria2 start
    /opt/etc/init.d/S80lighttpd start
  • Open in web browser (replace your router address): 192.168.1.1:81/aria2/
  • Configure Secret Token in Settings > Connection Settings > Enter the secret token default token is Passw0rd. Save settings on the bottom.
  • Done. You can download via http(s), ftp(s) and torrents.