summarylogtreecommitdiffstats
path: root/nmead.script
diff options
context:
space:
mode:
Diffstat (limited to 'nmead.script')
-rw-r--r--nmead.script18
1 files changed, 18 insertions, 0 deletions
diff --git a/nmead.script b/nmead.script
new file mode 100644
index 000000000000..ccb2c2fe1ca8
--- /dev/null
+++ b/nmead.script
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# source application-specific settings
+[ -f /etc/conf.d/nmead ] && . /etc/conf.d/nmead
+
+if [ ! -z "$NMEAD_BAUD" ]; then
+ NMEAD_OPTIONS+=" -b $NMEAD_BAUD"
+fi
+
+if [ ! -z "$NMEAD_TTY" ]; then
+ NMEAD_OPTIONS+=" -i $NMEAD_TTY"
+fi
+
+if [ ! -z "$NMEAD_PORT" ]; then
+ NMEAD_OPTIONS+=" -p $NMEAD_PORT"
+fi
+
+nmead $NMEAD_OPTIONS