#!/usr/bin/perl

# Simple script to stop a process spawned by ebox
# Stop those processes created by ebox through AbstactDaemon
use EBox::Config;

my $proc = $ARGV[0];
defined($proc) or die;
($proc =~ /\.\./) and die;

my $pidfile = EBox::Config::tmp . "/pids/$proc.pid";
(-f $pidfile) or die;
open(FD, $pidfile) or die;
my $pid = <FD>;
close(FD);
kill 2, $pid;





