aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/fbprogress/fbprogress/fbprogress-init
blob: c1dd3787b1a0ca69c2c3e5037bc6bc3b9594ef58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

. /etc/init.d/functions

case "$1" in
    start)
    # We don't want this script to block the rest of the boot process
    if [ "$2" != "background" ]; then
	$0 $1 background &
    else
	. /etc/profile

	echo "Starting FBProgress"
	fbprogress.sh &
    fi 
    ;;

    stop)
    echo "Stopping FBProgress"
    killproc fbprogress.sh
    ;;

    restart)
    $0 stop
    sleep 1
    $0 start
    ;;

    *)
    echo "usage: $0 { start | stop | restart }"
    ;;
esac

exit 0