feat: DH-HIS Web Giao Ban (Node.js & Express) complete codebase

This commit is contained in:
ongtrieuhau
2026-10-26 00:48:05 -07:00
commit f73ac7b5bb
18 changed files with 4464 additions and 0 deletions
Executable
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Script dừng dịch vụ web-giao-ban
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd "$DIR"
if systemctl is-active web-giao-ban.service >/dev/null 2>&1; then
echo "Stopping web-giao-ban via systemd..."
sudo systemctl stop web-giao-ban
echo "Stopped."
else
PID_FILE="$DIR/.app.pid"
if [ -f "$PID_FILE" ]; then
PID="$(cat "$PID_FILE")"
if kill -0 "$PID" 2>/dev/null; then
echo "Stopping web-giao-ban (PID: $PID)..."
kill "$PID" 2>/dev/null || true
sleep 1
fi
rm -f "$PID_FILE"
echo "Stopped."
else
# Kill by port 3000 if running
PID=$(lsof -t -i:3000 2>/dev/null || fuser 3000/tcp 2>/dev/null)
if [ -n "$PID" ]; then
echo "Killing process on port 3000 (PID: $PID)..."
kill -9 $PID 2>/dev/null || true
echo "Stopped."
else
echo "web-giao-ban is not running."
fi
fi
fi