Files
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

27 lines
510 B
Bash

#!/bin/sh
COMMAND=$1
#check if running
if ps aux | grep [c]hat-server > /dev/null
then
echo "[MgVideoChat] Running"
RUNNING="yes"
else
echo "[MgVideoChat] Not running"
RUNNING="no"
fi
#start or stop
if [ "$COMMAND" = "stop" ]
then
if [ $RUNNING = "yes" ]
then
echo "[MgVideoChat] stopping"
pkill -9 -f chat-server
fi
else
if [ $RUNNING = "no" ]
then
echo "[MgVideoChat] start"
nohup php chat-server.php 0<&- &> mg-chat-server.log &
fi
fi