summaryrefslogtreecommitdiffstats
path: root/package/babeld/S50babeld
diff options
context:
space:
mode:
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>2016-07-02 00:06:11 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-02 15:15:17 +0200
commit7c8c6e1b87fd127c72f79d001fe45fd43b1c9a4c (patch)
tree36f7af8c5940b83cf2bd67ae1be31cf3276b63a7 /package/babeld/S50babeld
parent321ee11c1a9914eab108ce619c6aadc11281b2a5 (diff)
downloadbuildroot-7c8c6e1b87fd127c72f79d001fe45fd43b1c9a4c.tar.gz
buildroot-7c8c6e1b87fd127c72f79d001fe45fd43b1c9a4c.zip
babeld: New package
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> [Thomas: use $(INSTALL) instead of install.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/babeld/S50babeld')
-rw-r--r--package/babeld/S50babeld40
1 files changed, 40 insertions, 0 deletions
diff --git a/package/babeld/S50babeld b/package/babeld/S50babeld
new file mode 100644
index 0000000000..c75b4c378a
--- /dev/null
+++ b/package/babeld/S50babeld
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Starts babeld.
+#
+
+# Allow a few customizations from a config file
+test -r /etc/default/babeld && . /etc/default/babeld
+
+start() {
+ printf "Starting babeld: "
+ start-stop-daemon -S -q -p /run/babeld.pid \
+ --exec /usr/sbin/babeld -- $DAEMON_ARGS
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+stop() {
+ printf "Stopping babeld: "
+ start-stop-daemon -K -q -p /run/babeld.pid
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
OpenPOWER on IntegriCloud