Commit 92f0bf60 authored by Michel Pelletier's avatar Michel Pelletier

aigh!

parent 08403910
......@@ -17,7 +17,7 @@ import os
###
# This should point to your Zope directory
SOFTWARE_HOME = '/usr/local/Zope'
SOFTWARE_HOME = '/projects/users/zmichel'
# This should point at the directory that contains your var directory.
# Most of the time this is the same as SOFTWARE_HOME
......@@ -39,10 +39,10 @@ HOSTNAME='localhost'
# IP address of your DNS server. If you have DNS service on your local machine
# then you can set this to '127.0.0.1'
DNS_IP='127.0.0.1'
DNS_IP='216.164.72.2'
# Port for HTTP Server. The standard port for HTTP services is 80.
HTTP_PORT=9673
HTTP_PORT=9222
# Module to publish. If you are not using the Zope management framework,
# this should be the name of your published module. Note that this module
......@@ -78,6 +78,19 @@ PCGI_FILE=os.path.join(SOFTWARE_HOME,'Zope.cgi')
import sys
sys.path.insert(0,os.path.join(SOFTWARE_HOME,'lib','python'))
# open and close the log file, to make sure one is there.
v = open(LOG_FILE, 'a')
v.close()
# if it hasn't failed at this point, create a .pid file.
pf = open(PID_FILE, 'w')
pf.write(str(os.getpid()))
pf.close()
# Try to become nobody. This will only work if this script is run by root.
try:
import pwd
......@@ -100,11 +113,6 @@ from FTPServer import FTPServer
# To disable some of the servers simply comment out the relevant stanzas.
# open and close the log file, to make sure one is there.
v = open(LOG_FILE, 'a')
v.close()
# Resolver and Logger, used by other servers
rs = resolver.caching_resolver(DNS_IP)
lg = logger.file_logger(LOG_FILE)
......@@ -129,12 +137,12 @@ zh = zhttp_handler(MODULE,'')
hs.install_handler(zh)
# FTP Server
zftp = FTPServer(
module=MODULE,
hostname=HOSTNAME,
port=FTP_PORT,
resolver=rs,
logger_object=lg)
## zftp = FTPServer(
## module=MODULE,
## hostname=HOSTNAME,
## port=FTP_PORT,
## resolver=rs,
## logger_object=lg)
# PCGI Server (uncomment to turn it on)
#zpcgi = PCGIServer(
......@@ -143,12 +151,6 @@ zftp = FTPServer(
# resolver=rs,
# logger_object=lg)
# if it hasn't failed at this point, create a .pid file.
pf = open(PID_FILE, 'w')
pf.write(str(os.getpid()))
pf.close()
# Start Medusa
......
......@@ -17,7 +17,7 @@ import os
###
# This should point to your Zope directory
SOFTWARE_HOME = '/usr/local/Zope'
SOFTWARE_HOME = '/projects/users/zmichel'
# This should point at the directory that contains your var directory.
# Most of the time this is the same as SOFTWARE_HOME
......@@ -39,10 +39,10 @@ HOSTNAME='localhost'
# IP address of your DNS server. If you have DNS service on your local machine
# then you can set this to '127.0.0.1'
DNS_IP='127.0.0.1'
DNS_IP='216.164.72.2'
# Port for HTTP Server. The standard port for HTTP services is 80.
HTTP_PORT=9673
HTTP_PORT=9222
# Module to publish. If you are not using the Zope management framework,
# this should be the name of your published module. Note that this module
......@@ -78,6 +78,19 @@ PCGI_FILE=os.path.join(SOFTWARE_HOME,'Zope.cgi')
import sys
sys.path.insert(0,os.path.join(SOFTWARE_HOME,'lib','python'))
# open and close the log file, to make sure one is there.
v = open(LOG_FILE, 'a')
v.close()
# if it hasn't failed at this point, create a .pid file.
pf = open(PID_FILE, 'w')
pf.write(str(os.getpid()))
pf.close()
# Try to become nobody. This will only work if this script is run by root.
try:
import pwd
......@@ -100,11 +113,6 @@ from FTPServer import FTPServer
# To disable some of the servers simply comment out the relevant stanzas.
# open and close the log file, to make sure one is there.
v = open(LOG_FILE, 'a')
v.close()
# Resolver and Logger, used by other servers
rs = resolver.caching_resolver(DNS_IP)
lg = logger.file_logger(LOG_FILE)
......@@ -129,12 +137,12 @@ zh = zhttp_handler(MODULE,'')
hs.install_handler(zh)
# FTP Server
zftp = FTPServer(
module=MODULE,
hostname=HOSTNAME,
port=FTP_PORT,
resolver=rs,
logger_object=lg)
## zftp = FTPServer(
## module=MODULE,
## hostname=HOSTNAME,
## port=FTP_PORT,
## resolver=rs,
## logger_object=lg)
# PCGI Server (uncomment to turn it on)
#zpcgi = PCGIServer(
......@@ -143,12 +151,6 @@ zftp = FTPServer(
# resolver=rs,
# logger_object=lg)
# if it hasn't failed at this point, create a .pid file.
pf = open(PID_FILE, 'w')
pf.write(str(os.getpid()))
pf.close()
# Start Medusa
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment