From f66a7df47bef6f915db3f912c76c163c27f1f137 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 18 Oct 2014 16:41:41 -0400 Subject: Add maintainer scripts --- diff --git a/dropbear.pkg/postinst b/dropbear.pkg/postinst new file mode 100644 index 0000000..e1645cb --- /dev/null +++ b/dropbear.pkg/postinst @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ "x${1}" = 'xconfigure' ]; then + mkdir -p /etc/dropbear + for keytype in rsa dsa; do + if ! [ -f "/etc/dropbear/dropbear_${keytype}_host_key" ]; then + /usr/bin/dropbearkey -t "${keytype}" \ + -f "/etc/dropbear/dropbear_${keytype}_host_key" + fi + done + /etc/init.d/dropbear enable + /etc/init.d/dropbear start +fi diff --git a/dropbear.pkg/prerm b/dropbear.pkg/prerm new file mode 100644 index 0000000..05fca4c --- /dev/null +++ b/dropbear.pkg/prerm @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "x${1}" = 'xremove' ]; then + /etc/init.d/dropbear stop + /etc/init.d/dropbear disable +fi -- cgit v0.9.1