mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-02-15 03:51:54 +00:00
* add our own fan controller, will need more tuning with time, but it's a great start * add restart/shutdown hooks for ulcmd, so the display shows the state of the system * change how we expose unifi's libs to binaries * Fixup systemd hang at boot due to networking * move ubnthal to systemd task, since we don't load modules due to the unifi initramfs in the prebuilt kernel
25 lines
453 B
Python
Executable file
25 lines
453 B
Python
Executable file
#!/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():
|
|
return jsonify({})
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run(host="0.0.0.0", port=11081)
|