Skip to content

Raspi Runner is a BASH script which will run all your scripts delivered by e-mail.

Notifications You must be signed in to change notification settings

enkydu/Raspi_Runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 

Repository files navigation

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 trigger@recipe.ifttt.com. 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! ;)

About

Raspi Runner is a BASH script which will run all your scripts delivered by e-mail.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages