diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-10-18 16:41:30 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-10-18 16:41:30 (EDT) |
commit | b63cf158faf1309eb05028dc705ebf2fef6d6873 (patch) | |
tree | 707b88ad969bffbeda33d4057a8d72ffe09d84c2 | |
parent | bd5c48a55c4b78cf457554ba3fe05155b2b5ef7c (diff) |
Add service initialization script
-rwxr-xr-x | build | 3 | ||||
-rw-r--r-- | dropbear.pkg/dropbear.init | 16 |
2 files changed, 19 insertions, 0 deletions
@@ -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 +} |