From b63cf158faf1309eb05028dc705ebf2fef6d6873 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 18 Oct 2014 16:41:30 -0400 Subject: Add service initialization script --- 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 +} -- cgit v0.9.1