Fixed support for debian images. Added repl test script, fixed logs.

Added restart phase, as the new config needs a restart to be picked up.