mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 07:50:25 +08:00
17 lines
343 B
Bash
17 lines
343 B
Bash
#bin/bash
|
|
|
|
execfile=./mayfly-go
|
|
|
|
pid=`ps ax | grep -i 'mayfly-go' | grep -v grep | awk '{print $1}'`
|
|
if [ ! -z "${pid}" ] ; then
|
|
echo "The mayfly-go already running, shutdown and restart..."
|
|
kill ${pid}
|
|
fi
|
|
|
|
if [ ! -x "${execfile}" ]; then
|
|
sudo chmod +x "${execfile}"
|
|
fi
|
|
|
|
nohup "${execfile}" &
|
|
|
|
echo "The mayfly-go running..." |