Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
fc4dfcfe
Commit
fc4dfcfe
authored
Apr 30, 2015
by
Jon Maron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python scripts modified to account for pid file env variable
parent
2fa785cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
metadata_config.py
src/bin/metadata_config.py
+6
-1
metadata_start.py
src/bin/metadata_start.py
+1
-1
metadata_stop.py
src/bin/metadata_stop.py
+1
-1
No files found.
src/bin/metadata_config.py
View file @
fc4dfcfe
...
@@ -30,9 +30,10 @@ CONF = "conf"
...
@@ -30,9 +30,10 @@ CONF = "conf"
LOG
=
"logs"
LOG
=
"logs"
WEBAPP
=
"server"
+
os
.
sep
+
"webapp"
WEBAPP
=
"server"
+
os
.
sep
+
"webapp"
DATA
=
"data"
DATA
=
"data"
ENV_KEYS
=
[
"JAVA_HOME"
,
"METADATA_OPTS"
,
"METADATA_LOG_DIR"
,
"METADATA_CONF"
,
"METADATACPPATH"
,
"METADATA_DATA_DIR"
,
"METADATA_HOME_DIR"
,
"METADATA_EXPANDED_WEBAPP_DIR"
]
ENV_KEYS
=
[
"JAVA_HOME"
,
"METADATA_OPTS"
,
"METADATA_LOG_DIR"
,
"METADATA_
PID_DIR"
,
"METADATA_
CONF"
,
"METADATACPPATH"
,
"METADATA_DATA_DIR"
,
"METADATA_HOME_DIR"
,
"METADATA_EXPANDED_WEBAPP_DIR"
]
METADATA_CONF
=
"METADATA_CONF"
METADATA_CONF
=
"METADATA_CONF"
METADATA_LOG
=
"METADATA_LOG_DIR"
METADATA_LOG
=
"METADATA_LOG_DIR"
METADATA_PID
=
"METADATA_PID_DIR"
METADATA_WEBAPP
=
"METADATA_EXPANDED_WEBAPP_DIR"
METADATA_WEBAPP
=
"METADATA_EXPANDED_WEBAPP_DIR"
METADATA_OPTS
=
"METADATA_OPTS"
METADATA_OPTS
=
"METADATA_OPTS"
METADATA_DATA
=
"METADATA_DATA_DIR"
METADATA_DATA
=
"METADATA_DATA_DIR"
...
@@ -62,6 +63,10 @@ def logDir(dir):
...
@@ -62,6 +63,10 @@ def logDir(dir):
localLog
=
os
.
path
.
join
(
dir
,
LOG
)
localLog
=
os
.
path
.
join
(
dir
,
LOG
)
return
os
.
environ
.
get
(
METADATA_LOG
,
localLog
)
return
os
.
environ
.
get
(
METADATA_LOG
,
localLog
)
def
pidFile
(
dir
):
localPid
=
os
.
path
.
join
(
dir
,
LOG
)
return
os
.
path
.
join
(
os
.
environ
.
get
(
METADATA_PID
,
localPid
),
'metadata.pid'
)
def
dataDir
(
dir
):
def
dataDir
(
dir
):
data
=
os
.
path
.
join
(
dir
,
DATA
)
data
=
os
.
path
.
join
(
dir
,
DATA
)
return
os
.
environ
.
get
(
METADATA_DATA
,
data
)
return
os
.
environ
.
get
(
METADATA_DATA
,
data
)
...
...
src/bin/metadata_start.py
View file @
fc4dfcfe
...
@@ -51,7 +51,7 @@ def main():
...
@@ -51,7 +51,7 @@ def main():
+
os
.
path
.
join
(
web_app_dir
,
"metadata"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"metadata"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
metadata_home
,
"libext"
,
"*"
)
+
os
.
path
.
join
(
metadata_home
,
"libext"
,
"*"
)
metadata_pid_file
=
os
.
path
.
join
(
logdir
,
"metadata.pid"
)
metadata_pid_file
=
mc
.
pidFile
(
metadata_home
)
if
os
.
path
.
isfile
(
metadata_pid_file
):
if
os
.
path
.
isfile
(
metadata_pid_file
):
print
"
%
s already exists, exiting"
%
metadata_pid_file
print
"
%
s already exists, exiting"
%
metadata_pid_file
...
...
src/bin/metadata_stop.py
View file @
fc4dfcfe
...
@@ -28,7 +28,7 @@ def main():
...
@@ -28,7 +28,7 @@ def main():
piddir
=
mc
.
dirMustExist
(
mc
.
logDir
(
metadata_home
))
piddir
=
mc
.
dirMustExist
(
mc
.
logDir
(
metadata_home
))
mc
.
executeEnvSh
(
confdir
)
mc
.
executeEnvSh
(
confdir
)
metadata_pid_file
=
os
.
path
.
join
(
piddir
,
"metadata.pid"
)
metadata_pid_file
=
mc
.
pidFile
(
metadata_home
)
try
:
try
:
pf
=
file
(
metadata_pid_file
,
'r'
)
pf
=
file
(
metadata_pid_file
,
'r'
)
...
...
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