aidevops 3.8.58 → 3.8.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/aidevops.sh +1 -1
- package/package.json +1 -1
- package/setup-modules/agent-deploy.sh +19 -9
- package/setup.sh +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.8.
|
|
1
|
+
3.8.60
|
package/aidevops.sh
CHANGED
package/package.json
CHANGED
|
@@ -19,19 +19,26 @@ IFS=$'\n\t'
|
|
|
19
19
|
# auto-restart mechanism exists, we start it manually.
|
|
20
20
|
#######################################
|
|
21
21
|
_restart_pulse_if_running() {
|
|
22
|
-
|
|
22
|
+
# Anchor the pattern so it only matches the running script, not editors or
|
|
23
|
+
# grep commands that happen to contain "pulse-wrapper.sh" in their argv.
|
|
24
|
+
local pattern="(^|/)pulse-wrapper\\.sh( |$)"
|
|
25
|
+
|
|
26
|
+
if ! pgrep -f "$pattern" >/dev/null; then
|
|
23
27
|
# Not running, nothing to do
|
|
24
28
|
return 0
|
|
25
29
|
fi
|
|
26
30
|
|
|
27
31
|
local old_pid
|
|
28
|
-
old_pid=$(pgrep -f
|
|
32
|
+
old_pid=$(pgrep -f "$pattern" | tail -1)
|
|
33
|
+
if [[ -z "$old_pid" ]]; then
|
|
34
|
+
return 0
|
|
35
|
+
fi
|
|
29
36
|
print_info "Restarting pulse (PID $old_pid) to load updated scripts..."
|
|
30
|
-
pkill -f
|
|
37
|
+
pkill -f "$pattern" || true
|
|
31
38
|
|
|
32
39
|
# Wait for it to die
|
|
33
40
|
local wait_count=0
|
|
34
|
-
while pgrep -f
|
|
41
|
+
while pgrep -f "$pattern" >/dev/null && [[ "$wait_count" -lt 10 ]]; do
|
|
35
42
|
sleep 1
|
|
36
43
|
wait_count=$((wait_count + 1))
|
|
37
44
|
done
|
|
@@ -39,12 +46,15 @@ _restart_pulse_if_running() {
|
|
|
39
46
|
# Give launchd/cron a moment to restart it
|
|
40
47
|
sleep 5
|
|
41
48
|
|
|
42
|
-
# Check if it auto-restarted
|
|
43
|
-
if
|
|
49
|
+
# Check if it auto-restarted with a different PID (guards against false
|
|
50
|
+
# success if the old process failed to terminate).
|
|
51
|
+
if pgrep -f "$pattern" >/dev/null; then
|
|
44
52
|
local new_pid
|
|
45
|
-
new_pid=$(pgrep -f
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
new_pid=$(pgrep -f "$pattern" | tail -1)
|
|
54
|
+
if [[ -n "$new_pid" ]] && [[ "$new_pid" != "$old_pid" ]]; then
|
|
55
|
+
print_success "Pulse restarted (new PID $new_pid)"
|
|
56
|
+
return 0
|
|
57
|
+
fi
|
|
48
58
|
fi
|
|
49
59
|
|
|
50
60
|
# No auto-restart — start it manually
|
package/setup.sh
CHANGED
|
@@ -12,7 +12,7 @@ shopt -s inherit_errexit 2>/dev/null || true
|
|
|
12
12
|
# AI Assistant Server Access Framework Setup Script
|
|
13
13
|
# Helps developers set up the framework for their infrastructure
|
|
14
14
|
#
|
|
15
|
-
# Version: 3.8.
|
|
15
|
+
# Version: 3.8.60
|
|
16
16
|
#
|
|
17
17
|
# Quick Install:
|
|
18
18
|
# npm install -g aidevops && aidevops update (recommended)
|