passer par un alias pour les websockets
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
#!/bin/bash
|
||||
websocket_url=$(CreoleGet adresse_ip_eth0 non)
|
||||
websocket_portinterne=$(CreoleGet ninegate_websocket_portinterne non)
|
||||
|
||||
# Server Websocket
|
||||
if [[ "$1" != "restartifdown" ]]; then
|
||||
echo WEBSOCKET = STOP
|
||||
pid="$(pgrep -a -f gos:websocket | grep $websocket_portinterne)"
|
||||
pid="$(pgrep -a -f gos:websocket | grep 5556)"
|
||||
if [ -n "${pid}" ]; then
|
||||
IFS=' ' read -r -a array <<< "$pid"
|
||||
kill -9 ${array[0]};
|
||||
@ -13,7 +11,7 @@ if [[ "$1" != "restartifdown" ]]; then
|
||||
fi
|
||||
|
||||
# Port LISTEN ?
|
||||
pid="$(pgrep -a -f gos:websocket | grep $websocket_portinterne)"
|
||||
pid="$(pgrep -a -f gos:websocket | grep 5556)"
|
||||
restart="yes"
|
||||
if [ "$1" == "restartifdown" ] && [ -n "${pid}" ] ; then
|
||||
restart="no"
|
||||
@ -22,5 +20,5 @@ fi
|
||||
if [ "$restart" == "yes" ] && [ "$1" != "stop" ] ; then
|
||||
echo WEBSOCKET = START
|
||||
cd /var/www/html/ninegate
|
||||
bin/console gos:websocket:server --port $websocket_portinterne -a $websocket_url --no-debug -n -q --env=prod & disown
|
||||
systemctl restart wssninegate
|
||||
fi
|
Reference in New Issue
Block a user