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