Skip to content

Commit

Permalink
Implemented conf sbin percent variable substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnavarro committed Oct 21, 2022
1 parent 7239d4b commit 8c959a9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions conf/router_cider.conf.prod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"DESTINATION": "warehouse",
"RDR_INFO_URL": "https://cider.access-ci.org/xsede-api/provider/rdr/v1/resources",
"RDR_LAST_URL": "https://cider.access-ci.org/xsede-api/provider/rdr/v1/resources/last_update",
"CIDER_INFO_URL": "https://cider.access-ci.org/xsede-api/provider/rdr/v1/resources",
"CIDER_LAST_URL": "https://cider.access-ci.org/xsede-api/provider/rdr/v1/resources/last_update",
"AFFILIATIONS": ["XSEDE", "TACC", "ACCESS"],
"LOG_FILE": "/soft/warehouse-apps-2.0/Operations_Router_CiDeR/var/router_cider.log",
"LOG_FILE": "%APP_HOME%/router_cider.log",
"LOG_LEVEL": "warning",
"RUN_DIR": "/soft/warehouse-apps-2.0/Operations_Router_CiDeR/var",
"PID_FILE": "/soft/warehouse-apps-2.0/Operations_Router_CiDeR/var/router_cider.pid"
"RUN_DIR": "%APP_HOME%/var",
"PID_FILE": "%APP_HOME%/var/router_cider.pid"
}
4 changes: 2 additions & 2 deletions sbin/router_cider.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ After=network.target remote-fs.target nss-lookup.target

[Service]
Type=simple
EnvironmentFile=/soft/warehouse-apps-2.0/Operations_Router_CiDeR/PROD/sbin/router_cider.sysconfig
ExecStart=/soft/warehouse-apps-2.0/Operations_Router_CiDeR/PROD/sbin/router_cider.service.sh start
EnvironmentFile=%APP_HOME%/sbin/router_cider.sysconfig
ExecStart=%APP_HOME%/sbin/router_cider.service.sh start
User=software
Group=admin
Restart=always
Expand Down
6 changes: 3 additions & 3 deletions sbin/router_cider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
### END INIT INFO

####### Customizations START #######
APP_NAME=route_rdr
APP_BASE=/soft/warehouse-apps-2.0/Operations_Router_CiDeR
WAREHOUSE_BASE=/soft/warehouse-2.0
APP_NAME=%APP_NAME%
APP_BASE=%APP_HOME%
WAREHOUSE_BASE=%WAREHOUSE_HOME%
# Override in shell environment
if [ -z "$PYTHON_BASE" ]; then
PYTHON_BASE=/soft/python/python-3.7.7-base
Expand Down
14 changes: 7 additions & 7 deletions sbin/router_cider.sysconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
APP_NAME=router_cider
APP_BASE=/soft/warehouse-apps-2.0/Operations_Router_CiDeR
APP_BIN=/soft/warehouse-apps-2.0/Operations_Router_CiDeR/PROD/bin/route_rdr.py
APP_BASE=%APP_HOME%
APP_BIN=%APP_HOME%/PROD/bin/route_cider.py
# Add any command line options for your daemon here
APP_OPTS="-l info -c /soft/warehouse-apps-2.0/Operations_Router_CiDeR/conf/route_rdr.conf"
APP_OPTS="-l info -c ${APP_BASE}/conf/route_cider.conf"

PYTHON_BASE=/soft/python/python-3.7.7-base
PIPENV_BASE=/soft/warehouse-apps-2.0/Operations_Router_CiDeR/python
PYTHON_BASE=%PYTHON_BASE%
PIPENV_BASE=${APP_BASE}/python
PYTHON_BIN=python3
PYTHONPATH=/soft/warehouse-apps-2.0/Operations_Router_CiDeR/PROD/lib:/soft/warehouse-2.0/PROD/Operations_Warehouse_Django
PYTHONPATH=${APP_BASE}/PROD/lib:%WAREHOUSE_HOME%/PROD/Operations_Warehouse_Django

DJANGO_CONF=/soft/warehouse-apps-2.0/Operations_Router_CiDeR/conf/Operations_Warehouse_Django.conf
DJANGO_CONF=${APP_BASE}/conf/Operations_Warehouse_Django.conf
DJANGO_SETTINGS_MODULE=Operations_Warehouse_Django.settings

0 comments on commit 8c959a9

Please sign in to comment.