Turn Raspberry Pi Into Slot Machine

Followed the instruction: https://hackmypi.com/NASpi.php

Mount the disk

Since the external hard drive I had was NTFS, I need to install to make Pi recognize it:

sudo apt-get install ntfs-3g

Then, create a folder to be mounted so that your current user can access to it:

You can use x86 Linux machine (physical or virtual) to “open” Raspberry Pi SD card image, make changes you need (without running it) and close for use on real Raspberry Pi. If your target system needs to be. Raspberry Pi Setup. Install your Raspberry Pi into the case, and insert the microSD card into the Pi's microSD card slot. If you have not formatted your microSD card with Raspbian, please follow our guide on the formatting process. If you have the Raspberry Pi starter pack, your SD card should come with Raspbian pre-installed.

mkdir /media/usbhdd

Plug in the disk, and un-mount it by following steps:

Check the path of the disk in df , should be something like /dev/sda1 . Then, do

sudo umount /dev/sda1

sudo mount -t auto /dev/sda1 /media/usbhdd

Now the disk can be accessed through /media/usbhdd.

Install Samba

sudo apt-get install samba samba-common-bin

sudo vi /etc/samba/smb.conf

Add the following lines to the bottom:

[Cloud]
comment = Cloud Folder
path = /media/usbhdd
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

Then, add a linux user called cloud for it:

sudo useradd cloud -m -G users

Config the password below. Could be the same.

sudo passwd cloud

sudo smbpasswd -a cloud

Now, restart the service, and it should be seen from other machines:

sudo service smbd restart

For the downloading, I installed webui-aria2. Following instruction here: http://www.jianshu.com/p/03d08806e069

Basically, it uses docker to simplify the steps to install.

Install docker on Raspi:

curl -sSL https://get.docker.com | sh

sudo usermod -aG docker pi

Clone the source of webui-aria2:

git clone https://github.com/ziahamza/webui-aria2.git

cd webui-aria2
sudo docker build -f Dockerfile.arm -t yourname/webui-aria2 .

Turn Raspberry Pi Into Slot Machine Machines

Create three files under a new folder ~/aria/.aria2/ :

session.txt,aria2.log,aria2.conf

For aria2.conf, add following lines:

enable-rpc=true

rpc-allow-origin-all=true

rpc-listen-all=true

continue=true

Then, start the docker:

docker run –restart=always
-v /media/usbhdd:/data/downloads
-v /home/<USER>/aria/.aria2:/home/aria/.aria2
-p 6800:6800 -p 9100:8080
–name=”webui-aria2″
-d yourname/webui-aria2

Turn Raspberry Pi Into Slot Machine

Then you should see the page through http://<IP&gt;:9100

Turn Raspberry Pi Into Slot Machine Slot

Note: If you see connection failure on the web page, maybe need to consider to log into the docker container, and run the aria2 individually:

Turn Raspberry Pi Into Slot Machines

sudo docker exec -it webui-aria2 bash

Turn Raspberry Pi Into Slot Machine Casino Game

aria2c –enable-rpc –rpc-listen-all=true –rpc-allow-origin-all –daemon