mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-11-03 12:17:56 +00:00
24 lines
400 B
Python
Executable File
24 lines
400 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import socket
|
|
import sys
|
|
import os
|
|
|
|
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
|
|
server_address = '/tmp/app.ucentralgw'
|
|
|
|
try:
|
|
sock.connect(server_address)
|
|
except socket.error:
|
|
print >> sys.stderr, 'Could not connect'
|
|
sys.exit(1)
|
|
|
|
try:
|
|
message = 'set loglevel notice WebSocket'
|
|
sock.sendall(message.encode('utf-8'))
|
|
|
|
finally:
|
|
sock.close()
|
|
|