summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild3
-rw-r--r--dropbear.pkg/dropbear.init16
2 files changed, 19 insertions, 0 deletions
diff --git a/build b/build
index b84fcdf..b92f3fa 100755
--- a/build
+++ b/build
@@ -24,6 +24,9 @@ install: build
MULTI=1
oh-autoinstall -- \
PROGRAMS='dropbearconvert'
+ install -d -m 0755 dest/etc/init.d
+ install -p -m 0755 ../dropbear.pkg/dropbear.init \
+ dest/etc/init.d/dropbear
oh-fixperms
oh-strip
oh-installfiles
diff --git a/dropbear.pkg/dropbear.init b/dropbear.pkg/dropbear.init
new file mode 100644
index 0000000..ff2806b
--- /dev/null
+++ b/dropbear.pkg/dropbear.init
@@ -0,0 +1,16 @@
+#!/bin/sh /etc/rc.common
+
+START='50'
+STOP='60'
+
+start()
+{
+ log 'Starting dropbear'
+ start-stop-daemon -S -q -x /usr/sbin/dropbear
+}
+
+stop()
+{
+ log 'Stopping dropbear'
+ start-stop-daemon -K -q -p /var/run/dropbear.pid
+}