Lines 38-44
Link Here
|
38 |
|
38 |
|
39 |
def start (): |
39 |
def start (): |
40 |
|
40 |
|
41 |
print 'Starting HTTP proxy:', |
41 |
# print 'Starting HTTP proxy:', |
42 |
if os.path.isfile(PID) and os.path.getsize(PID): # pidfile exists and is not empty |
42 |
if os.path.isfile(PID) and os.path.getsize(PID): # pidfile exists and is not empty |
43 |
print 'already running' |
43 |
print 'already running' |
44 |
return 1 # error |
44 |
return 1 # error |
Lines 74-80
Link Here
|
74 |
except: |
74 |
except: |
75 |
print 'error:', sys.exc_info()[1] |
75 |
print 'error:', sys.exc_info()[1] |
76 |
else: |
76 |
else: |
77 |
print 'http-replicator.' |
77 |
# print 'http-replicator.' |
78 |
return 0 |
78 |
return 0 |
79 |
|
79 |
|
80 |
return 1 |
80 |
return 1 |
Lines 87-93
Link Here
|
87 |
|
87 |
|
88 |
def stop (): |
88 |
def stop (): |
89 |
|
89 |
|
90 |
print 'Stopping HTTP proxy:', |
90 |
# print 'Stopping HTTP proxy:', |
91 |
if not os.path.isfile(PID) or not os.path.getsize(PID): # pidfile does not exist or is empty |
91 |
if not os.path.isfile(PID) or not os.path.getsize(PID): # pidfile does not exist or is empty |
92 |
print 'not running' |
92 |
print 'not running' |
93 |
return 0 # success |
93 |
return 0 # success |
Lines 101-107
Link Here
|
101 |
except: |
101 |
except: |
102 |
print 'error:', sys.exc_info()[1] |
102 |
print 'error:', sys.exc_info()[1] |
103 |
else: |
103 |
else: |
104 |
print 'http-replicator.' |
104 |
# print 'http-replicator.' |
105 |
return 0 # success |
105 |
return 0 # success |
106 |
|
106 |
|
107 |
return 1 |
107 |
return 1 |