summaryrefslogtreecommitdiffstats
path: root/tests/apcupsd
blob: ef9bf02a9e5fbc23135e4ebb4597c43191e9d2e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
INITD=$@
PROC=$INITD
	apk_add $@
	/etc/init.d/$INITD start
	sleep 1
	pidof $PROC
	/etc/init.d/$INITD stop
	count=0;\
	while pidof $PROC; do\
		echo -n "." >/dev/tty;\
		sleep 1;\
		count=$((count + 1));\
		if [ $$count -gt 5 ]; then\
			killall -9 apcupsd;\
			exit 1;\
		fi;\
	done
	apk_del $@