mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 13:20:57 +00:00
15 lines
381 B
Bash
Executable File
15 lines
381 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. `pwd`/env.sh
|
|
|
|
TELNET_ACTIVE=`netstat -tlnp 2>/dev/null | grep ":$TELNET_PORT"`
|
|
if [[ $TELNET_PORT == "" ]] || [[ $TELNET_ACTIVE == "" ]]; then
|
|
echo "Could not find server on telnet port $TELNET_PORT. Perhaps server is not running?"
|
|
exit
|
|
fi
|
|
|
|
NC_CMD="nc -t 127.0.0.1 $TELNET_PORT"
|
|
echo -n exit | $NC_CMD > /dev/null
|
|
|
|
echo "Stopped server $SERVER_NAME"
|