Commit 53083619 authored by hackEns's avatar hackEns
Browse files

Clean startup.sh for Debian

parent ed848c21
startup.sh
start_ssh.sh
data/
__pycache__
*.pyc
......
......@@ -18,6 +18,8 @@ Jarvis can be easily installed on a Raspberry Pi, starting from an up-to-date Ra
*Note :* Jarvis requires a MySQL database to be used, and a webserver to serve the web visualisation (repo [Jarvis web](https://github.com/hackEns/Jarvis_web)). As our webserver does not run on the Raspberry Pi, the above scripts do not include the setup for the webserver and the MySQL database. You should install and set them yourself. `system/jarvis.sql` contains all the necessary information to setup the database and tables.
`startup.sh` is a service to use to start Jarvis automatically (Debian).
## Files and folders
......
#### BEGIN INIT INFO
# Provides: jarvis
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 1 2 3 4 5
# Default-Stop: 0 6
# Short-Description: Jarvis launcher
#### END INIT INFO
#!/bin/sh
su jarvis
gpio export 1 out
gpio export 7 out
until ping -c 4 hackens.org > /dev/null 2>&1; do
sleep 2
done
if ! nc -z localhost 3306; then
# Open SSH tunnel for MySQL
ssh -NfL 3306:localhost:3306 hackens@hackens.org &
fi
screen -dmS jarvis && screen -S jarvis -p 0 -X stuff "~/Jarvis/jarvis.py$(printf \\r)"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment