Use a local config file only when it exists
This commit is contained in:
parent
e630a0628d
commit
d210848580
|
@ -14,6 +14,7 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import os
|
||||
import sys
|
||||
import eventlet
|
||||
from moniker.openstack.common import cfg
|
||||
|
@ -25,7 +26,9 @@ eventlet.monkey_patch()
|
|||
|
||||
config_files = cfg.find_config_files(project='moniker',
|
||||
prog='moniker-agent-bind9')
|
||||
config_files.append('./etc/moniker-agent-bind9.conf')
|
||||
|
||||
if os.path.exists('./etc/moniker-agent-bind9.conf'):
|
||||
config_files.append('./etc/moniker-agent-bind9.conf')
|
||||
|
||||
cfg.CONF(sys.argv[1:], project='moniker', prog='moniker-agent-bind9',
|
||||
default_config_files=config_files)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import os
|
||||
import sys
|
||||
import eventlet
|
||||
from moniker.openstack.common import cfg
|
||||
|
@ -25,7 +26,9 @@ eventlet.monkey_patch()
|
|||
|
||||
config_files = cfg.find_config_files(project='moniker',
|
||||
prog='moniker-api')
|
||||
config_files.append('./etc/moniker-api.conf')
|
||||
|
||||
if os.path.exists('./etc/moniker-api.conf'):
|
||||
config_files.append('./etc/moniker-api.conf')
|
||||
|
||||
cfg.CONF(sys.argv[1:], project='moniker', prog='moniker-api',
|
||||
default_config_files=config_files)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import os
|
||||
import sys
|
||||
import eventlet
|
||||
from moniker.openstack.common import cfg
|
||||
|
@ -25,7 +26,9 @@ eventlet.monkey_patch()
|
|||
|
||||
config_files = cfg.find_config_files(project='moniker',
|
||||
prog='moniker-central')
|
||||
config_files.append('./etc/moniker-central.conf')
|
||||
|
||||
if os.path.exists('./etc/moniker-central.conf'):
|
||||
config_files.append('./etc/moniker-central.conf')
|
||||
|
||||
cfg.CONF(sys.argv[1:], project='moniker', prog='moniker-central',
|
||||
default_config_files=config_files)
|
||||
|
|
Loading…
Reference in New Issue