#!/bin/bash
#--------------------------
# Testing open-iscsi daemon
#--------------------------
set -e

/etc/init.d/open-iscsi start > /dev/null 2>&1

if pidof -x iscsid > /dev/null; then
    echo "OK"
    exit 0
else
    echo "ERROR: OPEN-ISCSI IS NOT RUNNING"
    exit 1
fi
