mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 21:24:20 +01:00
Fix gassistant cherrypy (#148)
* Update hassio_oauth.py * Update config.json * Update run.sh * Update run.sh * Update config.json
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "Google Assistant",
|
"name": "Google Assistant",
|
||||||
"version": "0.0.3-p2",
|
"version": "0.0.3-p3",
|
||||||
"slug": "google_assistant",
|
"slug": "google_assistant",
|
||||||
"description": "A virtual personal assistant developed by Google",
|
"description": "A virtual personal assistant developed by Google",
|
||||||
"url": "https://home-assistant.io/addons/google_assistant/",
|
"url": "https://home-assistant.io/addons/google_assistant/",
|
||||||
"startup": "application",
|
"startup": "application",
|
||||||
"boot": "auto",
|
"boot": "auto",
|
||||||
"arch": ["armhf", "amd64"],
|
"arch": ["armhf", "amd64"],
|
||||||
"map": ["share:rw"],
|
"map": ["share"],
|
||||||
"devices": ["/dev/snd:/dev/snd:rwm"],
|
"devices": ["/dev/snd:/dev/snd:rwm"],
|
||||||
"ports": {
|
"ports": {
|
||||||
"9324/tcp": 9324
|
"9324/tcp": 9324
|
||||||
|
|||||||
@@ -75,5 +75,5 @@ if __name__ == '__main__':
|
|||||||
with oauth_json.open('r') as data:
|
with oauth_json.open('r') as data:
|
||||||
user_data = json.load(data)['installed']
|
user_data = json.load(data)['installed']
|
||||||
|
|
||||||
cherrypy.config.update({'server.socket_port': 9324})
|
cherrypy.config.update({'server.socket_port': 9324, 'server.socket_host': '0.0.0.0'})
|
||||||
cherrypy.quickstart(oauth2Site(user_data, cred_json))
|
cherrypy.quickstart(oauth2Site(user_data, cred_json))
|
||||||
|
|||||||
@@ -20,11 +20,12 @@ sed -i "s/%%MIC%%/$MIC/g" /root/.asoundrc
|
|||||||
if [ -f "/share/$CLIENT_SECRETS" ]; then
|
if [ -f "/share/$CLIENT_SECRETS" ]; then
|
||||||
echo "[Info] Install/Update service client_secrets file"
|
echo "[Info] Install/Update service client_secrets file"
|
||||||
cp -f "/share/$CLIENT_SECRETS" "$CLIENT_JSON"
|
cp -f "/share/$CLIENT_SECRETS" "$CLIENT_JSON"
|
||||||
rm -f "/share/$CLIENT_SECRETS"
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$CRED_JSON" ] && [ -f "$CLIENT_JSON" ]; then
|
||||||
echo "[Info] Start WebUI for handling oauth2"
|
echo "[Info] Start WebUI for handling oauth2"
|
||||||
python3 /hassio_oauth.py "$CLIENT_JSON" "$CRED_JSON"
|
python3 /hassio_oauth.py "$CLIENT_JSON" "$CRED_JSON"
|
||||||
elif [ ! -f "$CRED_JSON" ]; then
|
else
|
||||||
echo "[Error] You need initialize GoogleAssistant with a client secret json!"
|
echo "[Error] You need initialize GoogleAssistant with a client secret json!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user