Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
92f0bf60
Commit
92f0bf60
authored
May 13, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aigh!
parent
08403910
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
40 deletions
+44
-40
ZServer/start.py
ZServer/start.py
+22
-20
lib/python/ZServer/start.py
lib/python/ZServer/start.py
+22
-20
No files found.
ZServer/start.py
View file @
92f0bf60
...
...
@@ -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
=
9
673
HTTP_PORT
=
9
222
# 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
...
...
lib/python/ZServer/start.py
View file @
92f0bf60
...
...
@@ -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
=
9
673
HTTP_PORT
=
9
222
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment