Coder Social home page Coder Social logo

raspi_runner's Introduction

Raspi Runner

Raspi Runner is a BASH script which will run all your scripts delivered by e-mail. I created this script for my Raspberry Pi, because it is always up and online waiting for commands. But this script can be of course used by any Unix based system with bash shell.

Requirements

  1. Account on IFTTT.com - wicked sevice, for automatization!
  2. Setup Dropbox Uploader - script for communication with Dropbox. Make sure, that Raspi Runner will be installed in a same folder like Dropbox Uploader!
  3. Dropbox account
  4. Pushover or free Pushbullet account (optional) - if you wanna use notifications delivered to your smartphone

Getting started

IFTTT Recipe Setup

Raspi Runner is using IFTTT service for distributing commands delivered by e-mail to Dropbox. You can find prepared recipe with this functionality here IFTTT Recipe.

Dropbox Uploader Setup

Now you have to setup Dropbox Uploader according to user guide here. Then create dedicated folder for our files with commands on Dropbox, which will be delivered by e-mail (for example: Raspi_Commands). This Dropbox folder will be checked by Raspi Runner every 5 minutes.

Raspi Runner Setup

Last step is installation of Raspi Runner.

First, clone the repository using git:

git clone https://github.com/enkydu/Raspi_Runner

or download script manually with command:

wget https://raw.github.com/enkydu/Raspi_Runner/master/raspi_runner.sh

Initial setup of Raspi Runner

For quick configuration of Raspi Runner, please make script executable

chmod +x raspi_runner.sh

and start it with command

./raspi_runner.sh

Raspi Runner will ask you few questions during initial setup.

After this, Raspi Runner will create raspi_runner.cfg file with configuration.

./raspi_runner.sh
You started Raspi Runner for the first time.
Please answer few questions, which will be used for creation of config file.

What is name of Dropbox folder, for Raspi Runner commands? (i.e. Raspi_Commands): Raspi_Commands
what is the full path to your Dropbox Uploader? (i.e. /home/pi/Dropbox_Uploader): /home/pi/Dropbox_Uploader


Please check, if displayed information are correct.
***************************************************
Name of Dropbox folder: Raspi_Commands
Full path to Dropbox Uploader installation: /home/pi/Dropbox_Uploader

Are these values correct? [y/n]: y

Raspi Runner setup is finished!
***************************************
Please continue with setup of crontab according to README.
If you are planning to use Pushover notifications on your smartfone,
please follow instructions in README too. Little changes in Raspi Runner
script will be necessary.

Enjoy!

Pushover setup

You can recieve notification on your smartphone after execution of scripts. This is provided by service Pushover.net. You have to fill in information regarding your APP_TOKEN & USER_KEY and remove hash symbols (#) in front of rows to activate this functionality.

Schedule crontab

After initial setup, it is necessary to schedule crontab for scheduled running of Raspi Runner. For example, you can use 5 minutes delay. Raspi Runner will check Dropbox for delivered commands and will execute them each 5 minutes.

Open crontab with command

crontab -e

and add new entry

*/5 * * * * /home/pi/Raspi_Runner/raspi_runner.sh > /dev/null 2>&1

Usage

Usage of Raspi Runner is very simple. You just have to send e-mail with your BASH commands to e-mail address [email protected]. from your e-mail account, which you used for setup of IFTTT.com.

All commands delivered by e-mail to IFTTT.com will be converted to TXT files, which will be stored in folder e.i. Raspi_Commands on Dropbox. This folder is checked every 5 minutes by Raspi Runner and if any new file with commands is found, Raspi Runner will execute it. Thats it. Enjoy! ;)

raspi_runner's People

Contributors

enkydu avatar bakroistvan avatar

Watchers

James Cloos avatar Richard Saouma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.