You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
297 B
18 lines
297 B
#!/bin/bash
|
|
|
|
if [ -f "rtbwn.pid" ]; then
|
|
echo "Server is already active"
|
|
exit
|
|
fi
|
|
|
|
if [ ! -f "main.js" ]; then
|
|
echo "Run this script from the server directory"
|
|
exit
|
|
fi
|
|
|
|
echo "" > error.log
|
|
node main.js 1>/dev/null 2>>error.log &
|
|
echo $! > rtbwn.pid
|
|
|
|
echo Daemon started at PID $(cat rtbwn.pid)
|