コード例 #1
0
import subprocess
import threading
import emailmod
import networkdbmod
import selectedplanmod
# stuff for the IP detection
import shlex
import re
import urllib2
import socket
import time
import wpa_cli_mod

logger = logging.getLogger("hydrosys4." + __name__)

localwifisystem = networkdbmod.getAPSSID()
if localwifisystem == "":
    localwifisystem = "hydrosys4"
    print "error the name of AP not found, double check the hostapd configuration"
    logger.error(
        "error the name of AP not found, double check the hostapd configuration"
    )
LOCALPORT = 5020
PUBLICPORT = networkdbmod.getPORT()
WAITTOCONNECT = networkdbmod.getWAITTOCONNECT()
if WAITTOCONNECT == "":
    WAITTOCONNECT = 180  # should be 180 at least
    networkdbmod.changesavesetting(
        'APtime', WAITTOCONNECT)  # if field not present it will be added
IPADDRESS = networkdbmod.getIPaddress()
EXTERNALIPADDR = ""
コード例 #2
0
ファイル: networkmod.py プロジェクト: Hydrosys4/Master
import subprocess
import threading
import emailmod
import networkdbmod
import selectedplanmod
# stuff for the IP detection
import shlex
import re
import urllib2
import socket
import time
import wpa_cli_mod

logger = logging.getLogger("hydrosys4."+__name__)

localwifisystem=networkdbmod.getAPSSID()
if localwifisystem=="":
	localwifisystem="hydrosys4"
	print "error the name of AP not found, double check the hostapd configuration"
	logger.error("error the name of AP not found, double check the hostapd configuration")
LOCALPORT=5020
PUBLICPORT=networkdbmod.getPORT()
WAITTOCONNECT=networkdbmod.getWAITTOCONNECT()
if WAITTOCONNECT=="":
	WAITTOCONNECT=180 # should be 180 at least
	networkdbmod.changesavesetting('APtime',WAITTOCONNECT) # if field not present it will be added
IPADDRESS =networkdbmod.getIPaddress()
EXTERNALIPADDR=""