Skip to content

Commit

Permalink
Merge pull request #4 from nsmfoo/misc_fix
Browse files Browse the repository at this point in the history
Check that the choosen page-dir exists before SNARE is launched. The …
  • Loading branch information
glaslos committed Jan 14, 2016
2 parents 4977364 + fd4e25d commit 441dc0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions snare.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ def _run_cmd(cmd):
parser.add_argument("--tanner", help="ip of the tanner service", default='tanner.mushmush.org')
parser.add_argument("--skip-check-version", help="skip check for update", action='store_true')
args = parser.parse_args()
if not os.path.exists('/opt/snare/pages/' + args.page_dir):
print("--page-dir: {0} does not exist".format(args.page_dir))
exit()
future = loop.create_server(
lambda: HttpRequestHandler(args, debug=args.debug, keep_alive=75),
args.interface, args.port)
Expand Down

0 comments on commit 441dc0c

Please sign in to comment.