feat: initial upload

Initial public release
This commit is contained in:
Chris Blake 2024-05-19 14:04:59 -05:00
commit 85a5bd66e0
30 changed files with 943 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#!/usr/bin/python3
from flask import Flask, jsonify
import socket
app = Flask(__name__)
@app.route('/api/info')
def api_info():
print(socket.gethostname())
payload = {
"isSetup": True,
"hostname": socket.gethostname(),
}
return jsonify(payload)
# No controllers for you
@app.route('/api/controllers')
def api_controllers():
payload = {}
return jsonify(payload)
if __name__ == '__main__':
app.run(host="0.0.0.0", port=11081)

View file

@ -0,0 +1,9 @@
#!/bin/bash
if [ "$1" == "poweroff" ]; then
poweroff
elif [ "$1" == "reboot" ]; then
reboot
else
echo "Unknown ubnt-systool cmd: $@" >> /tmp/ubnt-systool-unknown.log
fi