diff --git a/conf/router_cider.conf.prod b/conf/router_cider.conf.prod index 5ccb38c..790ebe1 100644 --- a/conf/router_cider.conf.prod +++ b/conf/router_cider.conf.prod @@ -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" } diff --git a/sbin/router_cider.service b/sbin/router_cider.service index 336fa00..697e8fb 100644 --- a/sbin/router_cider.service +++ b/sbin/router_cider.service @@ -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 diff --git a/sbin/router_cider.sh b/sbin/router_cider.sh index 45bde10..4fa832c 100755 --- a/sbin/router_cider.sh +++ b/sbin/router_cider.sh @@ -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 diff --git a/sbin/router_cider.sysconfig b/sbin/router_cider.sysconfig index e12103e..4c98588 100644 --- a/sbin/router_cider.sysconfig +++ b/sbin/router_cider.sysconfig @@ -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