summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/neard/neard/neard.in
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-connectivity/neard/neard/neard.in
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/neard/neard/neard.in')
-rw-r--r--meta/recipes-connectivity/neard/neard/neard.in54
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/neard/neard/neard.in b/meta/recipes-connectivity/neard/neard/neard.in
new file mode 100644
index 0000000000..a47d4d96c9
--- /dev/null
+++ b/meta/recipes-connectivity/neard/neard/neard.in
@@ -0,0 +1,54 @@
1#!/bin/sh
2#
3# start/stop neard daemon.
4
5### BEGIN INIT INFO
6# Provides: neard
7# Required-Start: $network
8# Required-Stop: $network
9# Default-Start: S 2 3 4 5
10# Default-Stop: 0 1 6
11# Short-Description: NFC daemon
12# Description: neard is a daemon used to enable NFC features
13### END INIT INFO
14
15DAEMON=@installpath@/neard
16PIDFILE=/var/run/neard.pid
17DESC="Linux NFC daemon"
18
19if [ -f /etc/default/neard ] ; then
20 . /etc/default/neard
21fi
22
23set -e
24
25do_start() {
26 $DAEMON
27}
28
29do_stop() {
30 start-stop-daemon --stop --name neard --quiet
31}
32
33case "$1" in
34 start)
35 echo "Starting $DESC"
36 do_start
37 ;;
38 stop)
39 echo "Stopping $DESC"
40 do_stop
41 ;;
42 restart|force-reload)
43 echo "Restarting $DESC"
44 do_stop
45 sleep 1
46 do_start
47 ;;
48 *)
49 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
50 exit 1
51 ;;
52esac
53
54exit 0