luci-app-travelmate: sync with travelmate 2.0.1 4474/head
authorDirk Brenken <dev@brenken.org>
Sun, 27 Sep 2020 05:03:15 +0000 (07:03 +0200)
committerDirk Brenken <dev@brenken.org>
Sun, 27 Sep 2020 05:03:15 +0000 (07:03 +0200)
* just change the location of one state file

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/stations.js
applications/luci-app-travelmate/root/usr/share/rpcd/acl.d/luci-app-travelmate.json

index 42a1e9aa88cf2fc3a382e900ce3252c131be4b21..8b3b7d3993218872d6c82b9e19362414a904af36 100644 (file)
@@ -104,10 +104,10 @@ function handleSectionsVal(action, section_id, option, value) {
 */
 function handleStatus() {
        poll.add(function() {
-               L.resolveDefault(fs.stat('/var/run/travelmate.refresh'), null).then(function(res) {
+               L.resolveDefault(fs.stat('/var/state/travelmate.refresh'), null).then(function(res) {
                        if (res) {
-                               L.resolveDefault(fs.read_direct('/var/run/travelmate.refresh'), null).then(function(res) {
-                                       fs.remove('/var/run/travelmate.refresh');
+                               L.resolveDefault(fs.read_direct('/var/state/travelmate.refresh'), null).then(function(res) {
+                                       fs.remove('/var/state/travelmate.refresh');
                                        if (res && res === 'ui_reload') {
                                                location.reload();
                                        }
index f3861e0fb63b8cfa3462bd90074a99ef070bb20d..0fecc9a484ae27bcf2ddeadef34cd8f17cd2aefa 100644 (file)
@@ -3,7 +3,7 @@
                "description": "Grant access to LuCI app travelmate",
                "write": {
                        "file": {
-                               "/var/run/travelmate.refresh": [ "write" ]
+                               "/var/state/travelmate.refresh": [ "write" ]
                        },
                        "uci": [ "travelmate" ]
                },
@@ -12,7 +12,7 @@
                        "file": {
                                "/etc/travelmate/*.login": [ "list" ],
                                "/var/run/travelmate.pid": [ "read" ],
-                               "/var/run/travelmate.refresh": [ "read" ],
+                               "/var/state/travelmate.refresh": [ "read" ],
                                "/tmp/trm_runtime.json": [ "read" ],
                                "/sbin/logread -e trm-": [ "exec" ],
                                "/usr/sbin/logread -e trm-": [ "exec" ],