#! /usr/bin/env bash

sudo apt-get install python

if [[ -z "$(which pip2)" ]]
then
	curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
	sudo python get-pip.py
fi
sudo apt-get install python-gpiozero
sudo pip install pycryptodomex

[[ -f private.pem ]] || ./generate-keys.sh

sudo cp bathroom.service /lib/systemd/system/
sudo systemctl daemon-reload
