Upload files to ''
This commit is contained in:
parent
58f803bc54
commit
f3f7be1343
34
enable-usb-hid
Normal file
34
enable-usb-hid
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Echo commands to stdout.
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# Exit on first error.
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Treat undefined environment variables as errors.
|
||||||
|
set -u
|
||||||
|
|
||||||
|
if ! grep 'dtoverlay=dwc2' /boot/config; then
|
||||||
|
echo "dtoverlay=dwc2" >> /boot/config.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep dwc2 /etc/modules; then
|
||||||
|
echo "dwc2" >> /etc/modules
|
||||||
|
fi
|
||||||
|
|
||||||
|
ENABLE_RPI_HID_PATH=/opt/enable-rpi-hid
|
||||||
|
ENABLE_RPI_HID_DIR=$(dirname $ENABLE_RPI_HID_PATH)
|
||||||
|
|
||||||
|
mkdir -p "$ENABLE_RPI_HID_DIR"
|
||||||
|
wget https://raw.githubusercontent.com/mtlynch/ansible-role-key-mime-pi/master/files/enable-rpi-hid \
|
||||||
|
-O "$ENABLE_RPI_HID_PATH"
|
||||||
|
chmod +x "$ENABLE_RPI_HID_PATH"
|
||||||
|
|
||||||
|
cd $(mktemp -d)
|
||||||
|
wget https://raw.githubusercontent.com/mtlynch/ansible-role-key-mime-pi/master/templates/usb-gadget.systemd.j2
|
||||||
|
sed -e "s@{{ key_mime_pi_initialize_hid_script_path }}@${ENABLE_RPI_HID_PATH}@g" \
|
||||||
|
usb-gadget.systemd.j2 > /lib/systemd/system/usb-gadget.service
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable usb-gadget.service
|
16
requirements.txt
Normal file
16
requirements.txt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
eventlet==0.31.0
|
||||||
|
Flask==1.1.1
|
||||||
|
Flask-SocketIO==4.3.2
|
||||||
|
|
||||||
|
# Indirect dependencies
|
||||||
|
click==7.1.2
|
||||||
|
dnspython==2.0.0
|
||||||
|
greenlet==0.4.17
|
||||||
|
itsdangerous==1.1.0
|
||||||
|
Jinja2==2.11.3
|
||||||
|
MarkupSafe==1.1.1
|
||||||
|
monotonic==1.5
|
||||||
|
python-engineio==3.14.2
|
||||||
|
python-socketio==4.6.1
|
||||||
|
six==1.15.0
|
||||||
|
Werkzeug==1.0.1
|
4
spustenie.sh
Normal file
4
spustenie.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
. venv/bin/activate
|
||||||
|
export PORT=8000
|
||||||
|
./app/main.py
|
Loading…
Reference in New Issue
Block a user