@powerhousedao/ph-cli 0.40.85-dev.13 → 0.40.85-dev.14

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/ph-cli",
3
- "version": "0.40.85-dev.13",
3
+ "version": "0.40.85-dev.14",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -158,22 +158,24 @@ else
158
158
  connect_health="✅"
159
159
  fi
160
160
  # Get Nginx memory usage for the site
161
- connect_memory=$(ps -o rss= -p $(pgrep -f "nginx.*$PROJECT_NAME") 2>/dev/null | awk '{printf "%.1fmb", $1/1024}')
162
- # Get Nginx uptime
163
- connect_uptime=$(ps -o etime= -p $(pgrep -f "nginx.*$PROJECT_NAME") 2>/dev/null || echo "N/A")
161
+ nginx_pid=$(pgrep -f "nginx.*$PROJECT_NAME" | head -n 1)
162
+ if [ -n "$nginx_pid" ]; then
163
+ connect_memory=$(ps -o rss= -p "$nginx_pid" 2>/dev/null | awk '{printf "%.1fmb", $1/1024}')
164
+ connect_uptime=$(ps -o etime= -p "$nginx_pid" 2>/dev/null)
165
+ fi
164
166
  fi
165
167
  printf "%-15s %-10s %-15s %-10s %-10s\n" "Connect" "$connect_status" "$connect_memory" "$connect_uptime" "$connect_health"
166
168
 
167
169
  # Check Switchboard status
168
170
  switchboard_info=$(pm2 list | grep "switchboard_${PROJECT_NAME}")
169
171
  if [ -n "$switchboard_info" ]; then
170
- switchboard_status=$(echo "$switchboard_info" | awk '{print $10}')
172
+ switchboard_status="Enabled"
171
173
  switchboard_memory=$(echo "$switchboard_info" | awk '{print $12}')
172
174
  switchboard_uptime=$(echo "$switchboard_info" | awk '{print $7}')
173
175
  switchboard_health="✅"
174
176
  printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "$switchboard_status" "$switchboard_memory" "$switchboard_uptime" "$switchboard_health"
175
177
  else
176
- printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "Stopped" "N/A" "N/A" "❌"
178
+ printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "Disabled" "N/A" "N/A" "❌"
177
179
  fi
178
180
  echo "────────────────────────────────────────────────────────────────────"
179
181
  ;;
@@ -1,2 +1,2 @@
1
- export declare const version = "0.40.85-dev.13";
1
+ export declare const version = "0.40.85-dev.14";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated. DO NOT EDIT.
2
- export const version = "0.40.85-dev.13";
2
+ export const version = "0.40.85-dev.14";
3
3
  //# sourceMappingURL=version.js.map