stable Node.js version.
git clone https://github.com/RealYukiSan/control-center.git
cd control-center
touch track_message
chmod +x start-service.js
setsid start-service.js &>/tmp/start-service.log </dev/null
optional, add soft-link to executable:
ln -vs $(pwd)/start-service.js /usr/local/bin/start-service
chmod +x /usr/local/bin/start-service
read the official docs.
use ncat for testing purposes: ncat --verbose -k -l -p 6969
see the gist for further information.
fetch newest update from git remote and restart the bot:
exec setsid ./respawn.sh
read the gist
ps -eF | grep -v '\[*\]' | less
# or
ps -F --ppid 2 -p 2 --deselect | less
filter the list that only display non-kernel process in order to shorten the list, reference: stackoverflow
- wondering why the
sh -c
not exit when I executesetsid
program? - and wondering why, isolating chain of command to
respawn.sh
and callsh -c setsid
works like a charm? unlike call it directly withsh -c