summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit/add_service.sh
blob: 237af1337c2d6fb5955b50f1aa2f7ab4d18b5d29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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