diff --git a/php/status-update.php b/php/status-update.php index 7e0a334..ca7c877 100644 --- a/php/status-update.php +++ b/php/status-update.php @@ -14,7 +14,7 @@ $verify = mt_rand(); -$pub = file_get_contents("public$id.pub"); +$pub = file_get_contents("public$id.pem"); if ($pub === false) die("No public key found for door $id"); $request_file = "request$id"; diff --git a/php/status-update.php b/php/status-update.php index 7e0a334..ca7c877 100644 --- a/php/status-update.php +++ b/php/status-update.php @@ -14,7 +14,7 @@ $verify = mt_rand(); -$pub = file_get_contents("public$id.pub"); +$pub = file_get_contents("public$id.pem"); if ($pub === false) die("No public key found for door $id"); $request_file = "request$id"; diff --git a/pi/.gitignore b/pi/.gitignore new file mode 100644 index 0000000..858899e --- /dev/null +++ b/pi/.gitignore @@ -0,0 +1,2 @@ +get-pip.py +*.pem diff --git a/php/status-update.php b/php/status-update.php index 7e0a334..ca7c877 100644 --- a/php/status-update.php +++ b/php/status-update.php @@ -14,7 +14,7 @@ $verify = mt_rand(); -$pub = file_get_contents("public$id.pub"); +$pub = file_get_contents("public$id.pem"); if ($pub === false) die("No public key found for door $id"); $request_file = "request$id"; diff --git a/pi/.gitignore b/pi/.gitignore new file mode 100644 index 0000000..858899e --- /dev/null +++ b/pi/.gitignore @@ -0,0 +1,2 @@ +get-pip.py +*.pem diff --git a/pi/blink.py b/pi/blink.py new file mode 100644 index 0000000..afbe458 --- /dev/null +++ b/pi/blink.py @@ -0,0 +1,12 @@ +from time import sleep +import gpiozero as GP +from signal import pause + +l = GP.LED(18) + +b = GP.Button(16) + + +while True: + l.toggle() + sleep(1) diff --git a/php/status-update.php b/php/status-update.php index 7e0a334..ca7c877 100644 --- a/php/status-update.php +++ b/php/status-update.php @@ -14,7 +14,7 @@ $verify = mt_rand(); -$pub = file_get_contents("public$id.pub"); +$pub = file_get_contents("public$id.pem"); if ($pub === false) die("No public key found for door $id"); $request_file = "request$id"; diff --git a/pi/.gitignore b/pi/.gitignore new file mode 100644 index 0000000..858899e --- /dev/null +++ b/pi/.gitignore @@ -0,0 +1,2 @@ +get-pip.py +*.pem diff --git a/pi/blink.py b/pi/blink.py new file mode 100644 index 0000000..afbe458 --- /dev/null +++ b/pi/blink.py @@ -0,0 +1,12 @@ +from time import sleep +import gpiozero as GP +from signal import pause + +l = GP.LED(18) + +b = GP.Button(16) + + +while True: + l.toggle() + sleep(1) diff --git a/pi/setup-pip.sh b/pi/setup-pip.sh new file mode 100755 index 0000000..b5ec850 --- /dev/null +++ b/pi/setup-pip.sh @@ -0,0 +1,5 @@ +#! /usr/bin/env bash + +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +sudo python get-pip.py +sudo apt-get install python-gpiozero