Commit 23f28bee authored by Jim Fulton's avatar Jim Fulton

Moved open of log file after su to nobody.

parent 8665d032
...@@ -292,15 +292,6 @@ LOG_FILE=os.path.join(INSTANCE_HOME, 'var', 'Z2.log') ...@@ -292,15 +292,6 @@ LOG_FILE=os.path.join(INSTANCE_HOME, 'var', 'Z2.log')
# its PID to this file. # its PID to this file.
PID_FILE=os.path.join(INSTANCE_HOME, 'var', 'Z2.pid') PID_FILE=os.path.join(INSTANCE_HOME, 'var', 'Z2.pid')
# 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 to become nobody. This will only work if this script is run by root.
try: try:
import pwd import pwd
...@@ -312,6 +303,16 @@ try: ...@@ -312,6 +303,16 @@ try:
except: except:
pass pass
# 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()
# import ZServer stuff # import ZServer stuff
# First, we need to increase the number of threads # First, we need to increase the number of threads
......
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