mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-24 01:14:27 +01:00
Add explicit error when config file not found
This commit is contained in:
@@ -88,6 +88,11 @@ class CowrieServiceMaker(object):
|
||||
print('WARNING: reading cowrie.cfg from old location. Default is now etc/cowrie.cfg')
|
||||
cfgfile = 'cowrie.cfg'
|
||||
# End of backwards compatibility check
|
||||
|
||||
if not os.path.isfile(cfgfile):
|
||||
print("ERROR: Can't find config file {}".format(cfgfile))
|
||||
sys.exit(1)
|
||||
|
||||
cfg = readConfigFile(cfgfile)
|
||||
|
||||
# ssh is enabled by default
|
||||
|
||||
Reference in New Issue
Block a user