blob: 161d97aca796e7ed18ef58ac6cbaf0a5841f541a [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001#! /bin/sh
2#
3# This is an init script for openembedded
4# Copy it to /etc/init.d/atftpd and type
5# > update-rc.d atftpd defaults 60
6#
7
8
9test -f /usr/sbin/atftpd || exit 0
10
11test -d /srv/tftp || mkdir -p /srv/tftp
12
13case "$1" in
14 start)
15 echo -n "Starting tftp daemon: atftpd"
16 start-stop-daemon --start --quiet --exec /usr/sbin/atftpd -- --daemon --port 69
17 echo "."
18 ;;
19 stop)
20 echo -n "Stopping tftp daemon: atftpd"
21 start-stop-daemon --stop --quiet --exec /usr/sbin/atftpd
22 echo "."
23 ;;
24 reload|force-reload)
25 start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/atftpd
26 ;;
27 restart)
28 $0 stop
29 sleep 1
30 $0 start
31 ;;
32 *)
33 echo "Usage: /etc/init.d/atftpd {start|stop|reload|restart|force-reload}"
34 exit 1
35esac
36
37exit 0