#!/bin/bash
SERVICE_DIR=/var/service
SCRIPT_DIR=/etc/sv
if [ -d $SCRIPT_DIR/$1 ]
then
if [ -d $SERVICE_DIR/$1 ]
then
echo "$1 is already present"
else
ln -s $SCRIPT_DIR/$1 $SERVICE_DIR/$1
echo "adding $1"
fi
else
echo "couldn't find $SCRIPT_DIR/$1"
fi