#!/bin/bash -i

#
# This script removes a service of the ExaGear guest from the list of host services
# and cleans up rc links.
#
# Copyright (c) 2013 "Elbrus Technologies" LLC. All rights reserved.
#
# This script comes NO warranty, not even for MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#

my_dir=$(dirname $0)
etc="/etc/"

mgmt_script="$etc/init.d/$1"

image_dir=$(realpath "$my_dir/../..")

rm -f $mgmt_script
find ${etc}rc*.d -type l -name "*$1" | xargs rm -f

exit 0
