aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nuttcp/nuttcp/nuttcpd.init
blob: 7a466222134b363062c424a027ec5cfbba6aa451 (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
#! /bin/sh
#
# This is an init script for openembedded
# Copy it to /etc/init.d/nuttcpd and type
# > update-rc.d nuttcpd defaults 60
#


test -f /usr/sbin/nuttcp || exit 0

case "$1" in
  start)
    echo -n "Starting nuttcp background daemon"
    nuttcp -S
    echo "."
    ;;
  stop)
    echo -n "Stopping nuttcp background daemon"
    killall nuttcp
    echo "."
    ;;
  restart)
    stop
    sleep 1
    start
    echo "."
    ;;
  *)
    echo "Usage: /etc/init.d/nuttcpd {start|stop|restart}"
    exit 1
esac

exit 0