LR v0.4.14: upgrade LR procedures fixed; new shell command (lr_info).

Change-Id: I3d3bf92981505904d77bf2128eed5d1e68f3ac65
This commit is contained in:
Nicola Peditto 2019-07-29 17:51:08 +02:00
parent 233c175b91
commit 7f15d58f70
3 changed files with 15 additions and 2 deletions

View File

@ -4,6 +4,7 @@ include templates/plugins.example.json
include templates/services.example.json
include etc/systemd/system/s4t-lightning-rod.service
include etc/logrotate.d/lightning-rod.log
include scripts/lr_info
include scripts/lr_checks
include scripts/lr_install
include scripts/lr_configure

View File

@ -242,10 +242,12 @@ class DeviceManager(Module.Module):
if (version != None) and (version != "latest") and (version != ""):
LOG.info("--> version specified: " + str(version))
command = "pip3 install iotronic-lightningrod==" + str(version)
command = "pip3 install iotronic-lightningrod==" + str(version) \
+ " && lr_install"
else:
LOG.info("--> version not specified: set 'latest'")
command = "pip3 install --upgrade iotronic-lightningrod"
command = "pip3 install --upgrade " \
+ "iotronic-lightningrod && lr_install"
print("\nUpgrading LR: " + str(command))

10
scripts/lr_info Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/python3
import json
import requests
r = requests.get(url = "http://localhost:1474/info")
data = r.json()
print(json.dumps(data, indent=4, sort_keys=True))