mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-03-09 15:40:13 +00:00
feat: initial upload
Initial public release
This commit is contained in:
commit
85a5bd66e0
30 changed files with 943 additions and 0 deletions
23
overlay/filesystem/usr/bin/mock-ubnt-api
Executable file
23
overlay/filesystem/usr/bin/mock-ubnt-api
Executable 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)
|
9
overlay/filesystem/usr/bin/ubnt-systool
Executable file
9
overlay/filesystem/usr/bin/ubnt-systool
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue