Revisión 38
Añadido por Manu Mora Gordillo hace más de 14 años
main.py | ||
---|---|---|
import ZeroconfService
|
||
from BaseHTTPServer import HTTPServer
|
||
import logging
|
||
import os
|
||
import time
|
||
import WebServer
|
||
import MyUtils
|
||
|
||
rootPath = "/var/lib/autoclone"
|
||
LOG_FILENAME = "/var/log/autocloneserver.log"
|
||
rootPath = "/var/lib/autocloneserver"
|
||
downloadsPath = rootPath + "/www/"
|
||
portWebServer = 8000
|
||
classroom = "25"
|
||
classroomName = MyUtils.getClassroomName()
|
||
|
||
if __name__ == '__main__':
|
||
|
||
... | ... | |
f.write(md5Hash)
|
||
f.close()
|
||
|
||
service = ZeroconfService.ZeroconfService(name = str(portWebServer)+"@"+i, port=3000, stype = "_autoclone"+classroom+"._tcp") #, domain="replicant", host="localhost", text="Esto es una prueba")
|
||
service = ZeroconfService.ZeroconfService(name = str(portWebServer)+"@"+i, port=3000, stype = "_autoclone_"+classroomName+"._tcp") #, domain="replicant", host="localhost", text="Esto es una prueba")
|
||
service.publish()
|
||
|
||
# Start web server
|
Exportar a: Unified diff
Obtener nombre del aula