summaryrefslogtreecommitdiffstats
path: root/dropbear.pkg/postinst
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-10-18 16:41:41 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-10-18 16:41:41 (EDT)
commitf66a7df47bef6f915db3f912c76c163c27f1f137 (patch)
tree011069a47fde7242f9df170627adb0a293167f90 /dropbear.pkg/postinst
parentb63cf158faf1309eb05028dc705ebf2fef6d6873 (diff)
Add maintainer scripts
Diffstat (limited to 'dropbear.pkg/postinst')
-rw-r--r--dropbear.pkg/postinst13
1 files changed, 13 insertions, 0 deletions
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