chore: strip stray backslash from XC_VM string literals

Namespace-migration find/replace (XC_VM -> \XC_VM) leaked a backslash into
many plain string literals: CLI echo/log text, the MaxMind/GitHub outbound
User-Agents, the LB tarball temp path, process-match greps, the sysctl and
cron markers, the proxy ini section, and docblocks.

Most are cosmetic or self-consistent, but two carried upgrade hazards on
already-deployed servers, handled with migration guards:

- sysctl marker: writer + first-line check moved to `# XC_VM` together
  (one-time benign rewrite on upgrade).
- cron marker: switched to `# XC_VM` and added a purge to both root-crontab
  installers that drops lines with either the old `# \XC_VM` or the new
  `# XC_VM` marker before re-adding, so upgrades don't duplicate cron jobs.
  The xc_vm user crontab already does a full `crontab -r` rebuild.
This commit is contained in:
Divarion_D
2026-08-23 16:03:22 +03:00
parent 84dfecb33f
commit d1153ca787
30 changed files with 82 additions and 66 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ namespace XcVm\Core\Process;
* // Check if a process with specific executable is running
* if (ProcessManager::isRunning($pid, 'ffmpeg')) { ... }
*
* // Check named process (\XC_VM[123], Thumbnail[456], etc.)
* // Check named process (XC_VM[123], Thumbnail[456], etc.)
* if (ProcessManager::isNamedProcessRunning($pid, 'XC_VM', $streamId, PHP_BIN)) { ... }
*
* // Kill a process
@@ -82,7 +82,7 @@ class ProcessManager {
}
/**
* Check if a named process is running (e.g., \XC_VM[123])
* Check if a named process is running (e.g., XC_VM[123])
*
* Reads /proc/PID/cmdline and matches against "NAME[ID]" pattern.
*
@@ -379,7 +379,7 @@ class ProcessManager {
* Check if a monitor/proxy process is running.
*
* Extracted from ProcessManager::isMonitorAlive().
* Checks for \XC_VM[streamID] OR XC_VMProxy[streamID] in cmdline.
* Checks for XC_VM[streamID] OR XC_VMProxy[streamID] in cmdline.
*
* @param int $pid Process ID
* @param int|string $streamID Stream identifier