rename plstackapi_config to xos_config
diff --git a/planetstack/hpc_observer/fsck.py b/planetstack/hpc_observer/fsck.py
index 82258a7..c1d833a 100644
--- a/planetstack/hpc_observer/fsck.py
+++ b/planetstack/hpc_observer/fsck.py
@@ -6,7 +6,7 @@
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings")
sys.path.append("/opt/planetstack")
-from planetstack.config import Config
+from planetstack.config import Config, DEFAULT_CONFIG_FN
from util.logger import Logger, logging
from observer.syncstep import SyncStep
@@ -64,7 +64,7 @@
parser = argparse.ArgumentParser(usage='%(prog)s [options]')
# smbaker: util/config.py parses sys.argv[] directly to get config file name; include the option here to avoid
# throwing unrecognized argument exceptions
- parser.add_argument('-C', '--config', dest='config_file', action='store', default="/opt/planetstack/plstackapi_config",
+ parser.add_argument('-C', '--config', dest='config_file', action='store', default=DEFAULT_CONFIG_FN,
help='Name of config file.')
args = parser.parse_args()
diff --git a/planetstack/planetstack-backend.py b/planetstack/planetstack-backend.py
index 7d403c5..1347e44 100644
--- a/planetstack/planetstack-backend.py
+++ b/planetstack/planetstack-backend.py
@@ -3,7 +3,7 @@
import argparse
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings")
from observer.backend import Backend
-from planetstack.config import Config
+from planetstack.config import Config, DEFAULT_CONFIG_FN
try:
from django import setup as django_setup # django 1.7
@@ -36,7 +36,7 @@
help='Run as daemon.')
# smbaker: util/config.py parses sys.argv[] directly to get config file name; include the option here to avoid
# throwing unrecognized argument exceptions
- parser.add_argument('-C', '--config', dest='config_file', action='store', default="/opt/planetstack/plstackapi_config",
+ parser.add_argument('-C', '--config', dest='config_file', action='store', default=DEFAULT_CONFIG_FN,
help='Name of config file.')
args = parser.parse_args()
diff --git a/planetstack/planetstack/config.py b/planetstack/planetstack/config.py
index f7d9c9e..923964d 100644
--- a/planetstack/planetstack/config.py
+++ b/planetstack/planetstack/config.py
@@ -12,7 +12,12 @@
"""
"""
-DEFAULT_CONFIG_FN = '/opt/planetstack/plstackapi_config'
+XOS_ROOT = "/opt/planetstack"
+DEFAULT_CONFIG_FN = os.path.join(XOS_ROOT, "xos_config")
+
+# warning for now, remove once we're sure everyone has made the change
+if (os.path.exists("/opt/planetstack/plstackapi_config") and (not os.path.exists(DEFAULT_CONFIG_FN))):
+ print >> sys.stderr, "WARNING: did you forget to rename plstackapi_config to xos_config ??"
def isbool(v):
return v.lower() in ("true", "false")
diff --git a/planetstack/plstackapi_config b/planetstack/xos_config
similarity index 100%
rename from planetstack/plstackapi_config
rename to planetstack/xos_config