#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014, NORDUnet A/S.
# See LICENSE for licensing information.

import argparse
import subprocess
import sys

parser = argparse.ArgumentParser(description='')
parser.add_argument('toerl')
parser.add_argument('nodedir')
args = parser.parse_args()

p = subprocess.Popen(
    [args.toerl, args.nodedir],
    stdin=subprocess.PIPE)
p.communicate("halt().\n")