server_address = ('', 8080)
server = HTTPServer(server_address, BaseHTTPRequestHandler)
ENABLED=1
и в самом низу файла указать внутреннюю подсеть и внешний IP для неё OUTBOUND_SNAT_NET_HOST="10.8.0.1/24>4.3.2.1"
. #! /bin/sh
env >>/path/mydevice.log
file "/sys${DEVPATH}" >>/path/mydevice.log
if [ "${ACTION}" = add -a -d "/sys${DEVPATH}" ]; then
echo "add ${DEVPATH}" >>/path/mydevice.log
fi
lsusb >> /path/mydevice.log
{'photo': (image_name, image_data) }
{'photo': open(image_name, 'rb') }
{'photo': image_data }
b = BytesIO()
region.save(b, 'jpeg')
return b.getvalue()
#journalctl -xe
ExecReload=/bin/kill -s HUP $MAINPID