Compare commits

..

15 Commits

Author SHA1 Message Date
cedricve
6f290dddb2 Merge branch 'develop' 2015-05-23 17:10:03 +02:00
cedricve
d32ad81877 small fixes to run script 2015-05-23 17:09:50 +02:00
cedricve
f7032fcd34 Merge branch 'develop' 2015-05-23 00:29:04 +02:00
cedricve
368987c9e3 replace clean up 2015-05-23 00:28:47 +02:00
cedricve
f60cd19512 Merge branch 'master' into develop 2015-05-23 00:07:59 +02:00
cedricve
e5e582110e small correction Raspberry Pi 2015-05-23 00:07:47 +02:00
cedricve
04569ad076 Merge branch 'develop' 2015-05-23 00:05:38 +02:00
cedricve
55d4c0d759 add cleanup script for cloud 2015-05-23 00:05:25 +02:00
Cédric Verstraeten
60559c2a1d Update 3_installation.md 2015-04-26 21:54:17 +02:00
Cédric Verstraeten
157239a026 Update 3_installation.md 2015-04-26 21:54:03 +02:00
Cédric Verstraeten
b46e8b8a8a Update 3_installation.md 2015-04-24 13:34:41 +02:00
Cédric Verstraeten
a6a355993e Update 3_installation.md 2015-04-24 13:34:30 +02:00
Cédric Verstraeten
5a0e01b941 Update 3_installation.md 2015-04-22 15:38:18 +02:00
Cédric Verstraeten
5524f68a97 Update 3_installation.md 2015-04-22 15:38:16 +02:00
Cédric Verstraeten
1da2b2a1a5 Update README.md 2015-04-21 20:50:22 +02:00
7 changed files with 117 additions and 23 deletions

View File

@@ -28,13 +28,13 @@ First you will need to download the Kerberos image; click on the image below. Th
The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. Its a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!vY4WjKJD!2sZUuhzeVDFu47hSOQ94Jh27v0BLYpf6MRTBBzGfkrc)
#### Raspberry Pi Model 2
The Raspberry Pi 2 is the successor to the Raspberry Pi. It builds upon the original model B+ upgrading to 1 GB of RAM, and replacing the aged ARMv6l single-core with an ARMv7l Cortex-A7 quad-core.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!6AAGlAwa!dJqbpGBG_k2ZA2FACtTbY4WR2azaV2Izeur-k3_4RlU)
<a name="insert-your-sd-card"></a>
### 2. Insert your SD Card
@@ -98,4 +98,4 @@ If you will be using Kerberos.io with a WIFI dongle, then check out the [F.A.Q.
<a name="install-from-source"></a>
## Install from source
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to [compile the machinery](/1.0.0/machinery/installation) from source and [import the webinterface](/1.0.0/web/installation) into your favorite webserver.
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to [compile the machinery](/1.0.0/machinery/installation) from source and [import the webinterface](/1.0.0/web/installation) into your favorite webserver.

View File

@@ -34,12 +34,13 @@ Install node plugins
npm install
npm install -g grunt-cli
npm install -g forever
## Auto-start grunt
Create service file for cloud
nano /etc/systemd/system/cloud.service
nano /etc/systemd/system/cloud.service
Copy and paste the configuration to the cloud.service
@@ -48,13 +49,11 @@ Copy and paste the configuration to the cloud.service
[Service]
Type=oneshot
ExecStart= /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
ExecStart= /usr/bin/forever /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
[Install]
WantedBy=multi-user.target
Enable the service to start on boot
systemctl enable cloud.service
systemctl enable cloud.service

View File

@@ -8,6 +8,7 @@ The FAQ, Frequently Asked Questions, page contains **technical solutions** for c
* [How to setup WIFI connection on Raspberry Pi](#setup-wifi)
* [How to enable Raspberry Pi Camera Module](#how-to-enable-camera-module)
* [Arch Linux](#how-to-enable-camera-module-archlinux)
* [Clean up disk and memory space](#clean-up-disk)
<a name="expand-sd-card"></a>
## How to expand SD card root partition
@@ -226,4 +227,51 @@ To enable the camera module, you will need to add these lines to your /boot/conf
gpu_mem=128
start_file=start_x.elf
fixup_file=fixup_x.dat
disable_camera_led=1
disable_camera_led=1
<a name="clean-up-disk"></a>
## Clean up disk and memory space
The SD card of your Raspberry Pi, has limited space, therefore we need some process to clean up the images taken by the machinery.
mkdir /home/bash
nano /home/bash/run.sh
Copy paste the bash script
#!/bin/bash
################################################################
# Check if memory is more than 70%, if so refresh nodejs scripts
##
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
then
/usr/bin/forever restartall ;
fi;
#############################################
# Only keep images of last 3 days on sd-card.
##
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
##############################################################
# Check if disk size is more than 95%, if so remove some files
# from the capture directory.
##
if [[ $(df -h | grep /dev/root | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 95 ]];
then
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
fi;
Give rights to bash script
chmod +x /home/bash/run.sh
chmod 755 /home/bash/run.sh
Start cronjob that will run this bash script
crontab -e
Add following line
*/10 * * * * /bin/sh /home/bash/run.sh

View File

@@ -1,6 +1,6 @@
#KERBEROS.IO - documentation
This repository contains all the documentation that is displayed on the [documentation website](http://kerberos.io/docs). The documentation is written in [markdown](http://markdowntutorial.com/) The documentation includes information about: how kerberos works, how to install it and also some technical information for developers who are willing to contribute; for example how to add a new algorithm or a new output device.
This repository contains all the documentation that is displayed on the [documentation website](https://doc.kerberos.io/). The documentation is written in [markdown](http://markdowntutorial.com/) The documentation includes information about: how kerberos works, how to install it and also some technical information for developers who are willing to contribute; for example how to add a new algorithm or a new output device.
## Folder structure

View File

@@ -28,13 +28,13 @@ First you will need to download the Kerberos image; click on the image below. Th
The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. Its a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!vY4WjKJD!2sZUuhzeVDFu47hSOQ94Jh27v0BLYpf6MRTBBzGfkrc)
#### Raspberry Pi Model 2
The Raspberry Pi 2 is the successor to the Raspberry Pi. It builds upon the original model B+ upgrading to 1 GB of RAM, and replacing the aged ARMv6l single-core with an ARMv7l Cortex-A7 quad-core.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!6AAGlAwa!dJqbpGBG_k2ZA2FACtTbY4WR2azaV2Izeur-k3_4RlU)
<a name="insert-your-sd-card"></a>
### 2. Insert your SD Card
@@ -98,4 +98,4 @@ If you will be using Kerberos.io with a WIFI dongle, then check out the [F.A.Q.
<a name="install-from-source"></a>
## Install from source
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to [compile the machinery](/1.0.0/machinery/installation) from source and [import the webinterface](/1.0.0/web/installation) into your favorite webserver.
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to [compile the machinery](/1.0.0/machinery/installation) from source and [import the webinterface](/1.0.0/web/installation) into your favorite webserver.

View File

@@ -20,20 +20,21 @@ The cloud application is attached to the production bucket, so only images that
If you installed Kerberos from the image, you don't need to follow this tutorial as the service is installed natively.
cd /home
cd /home
Create a new directory
mkdir cloud && cd cloud
mkdir cloud && cd cloud
Checkout sync repository
git clone https://github.com/kerberos-io/sync-s3 .
git clone https://github.com/kerberos-io/sync-s3 .
Install node plugins
npm install
npm install -g grunt-cli
npm install
npm install -g grunt-cli
npm install -g forever
## Auto-start grunt
@@ -48,13 +49,11 @@ Copy and paste the configuration to the cloud.service
[Service]
Type=oneshot
ExecStart= /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
ExecStart= /usr/bin/forever /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
[Install]
WantedBy=multi-user.target
Enable the service to start on boot
systemctl enable cloud.service
systemctl enable cloud.service

View File

@@ -8,6 +8,7 @@ The FAQ, Frequently Asked Questions, page contains **technical solutions** for c
* [How to setup WIFI connection on Raspberry Pi](#setup-wifi)
* [How to enable Raspberry Pi Camera Module](#how-to-enable-camera-module)
* [Arch Linux](#how-to-enable-camera-module-archlinux)
* [Clean up disk and memory space](#clean-up-disk)
<a name="expand-sd-card"></a>
## How to expand SD card root partition
@@ -226,4 +227,51 @@ To enable the camera module, you will need to add these lines to your /boot/conf
gpu_mem=128
start_file=start_x.elf
fixup_file=fixup_x.dat
disable_camera_led=1
disable_camera_led=1
<a name="clean-up-disk"></a>
## Clean up disk and memory space
The SD card of your Raspberry Pi, has limited space, therefore we need some process to clean up the images taken by the machinery.
mkdir /home/bash
nano /home/bash/run.sh
Copy paste the bash script
#!/bin/bash
################################################################
# Check if memory is more than 70%, if so refresh nodejs scripts
##
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
then
/usr/bin/forever restartall ;
fi;
#############################################
# Only keep images of last 3 days on sd-card.
##
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
##############################################################
# Check if disk size is more than 95%, if so remove some files
# from the capture directory.
##
if [[ $(df -h | grep /dev/root | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 95 ]];
then
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
fi;
Give rights to bash script
chmod +x /home/bash/run.sh
chmod 755 /home/bash/run.sh
Start cronjob that will run this bash script
crontab -e
Add following line
*/10 * * * * /bin/sh /home/bash/run.sh