Initial commit

This commit is contained in:
Никита Сычев
2026-03-23 20:02:25 +03:00
commit b1eabf0a89
7 changed files with 209 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
HASP_BIN="/usr/sbin/hasplmd_x86_64"
HASP_PROC="hasplmd_x86_64"
REAL_BIN="/usr/bin/svace"
if [[ ! -x "$REAL_BIN" ]]; then
echo "ERROR: real svace binary not found: $REAL_BIN" >&2
exit 127
fi
if [[ -x "$HASP_BIN" ]]; then
if ! pgrep -x "$HASP_PROC" >/dev/null 2>&1; then
"$HASP_BIN" -s
if ! pgrep -x "$HASP_PROC" >/dev/null 2>&1; then
echo "ERROR: failed to start $HASP_PROC via $HASP_BIN -s" >&2
exit 1
fi
fi
else
echo "WARNING: $HASP_BIN not found" >&2
fi
exec "$REAL_BIN" "$@"