mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 20:53:56 +08:00
🚀 Sync 2026-07-21 20:34:38
This commit is contained in:
1 parent
9f2092b4f2
commit
87d970d38f
7 files changed
+646
-10
No files matched your search
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-daede
|
||||
PKG_VERSION:=1.14.7
|
||||
PKG_RELEASE:=34
|
||||
PKG_RELEASE:=35
|
||||
PKG_MAINTAINER:=kenzok8
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
||||
@@ -121,12 +121,27 @@ if [ "$fail" -ne 0 ]; then
|
||||
fi
|
||||
|
||||
if [ "$count" -gt 0 ] && [ "$ok" -gt 0 ] && /bin/pidof daed >/dev/null 2>&1; then
|
||||
state_body="$TMPDIR/state.json"
|
||||
state_resp="$TMPDIR/state.out"
|
||||
printf '%s' '{"query":"query General{general{dae{running modified}}}","variables":{}}' > "$state_body"
|
||||
if ! post_graphql "$state_body" "$state_resp" "$token" || grep -q '"errors"' "$state_resp"; then
|
||||
fail 8 "failed to query daed runtime state: $(cat "$state_resp" 2>/dev/null)"
|
||||
fi
|
||||
if ! grep -q '"running"[[:space:]]*:[[:space:]]*true' "$state_resp"; then
|
||||
log "daed proxy is stopped; skipping runtime apply"
|
||||
exit 0
|
||||
fi
|
||||
if ! grep -q '"modified"[[:space:]]*:[[:space:]]*true' "$state_resp"; then
|
||||
log "daed runtime is already up to date"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
run_body="$TMPDIR/run.json"
|
||||
run_resp="$TMPDIR/run.out"
|
||||
printf '{"query":"mutation Run($dry:Boolean!){run(dry:$dry)}","variables":{"dry":false}}' > "$run_body"
|
||||
log "applying updated subscriptions"
|
||||
if ! post_graphql "$run_body" "$run_resp" "$token" || grep -q '"errors"' "$run_resp"; then
|
||||
fail 8 "failed to apply updated subscriptions: $(cat "$run_resp" 2>/dev/null)"
|
||||
fail 9 "failed to apply updated subscriptions: $(cat "$run_resp" 2>/dev/null)"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user