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