From 834a24c2724df15fd7179d6395aa3e6997d20280 Mon Sep 17 00:00:00 2001 From: milisbir Date: Sun, 26 Nov 2017 22:15:05 +0200 Subject: [PATCH] dropbear.paketlendi --- talimatname/genel/d/dropbear/servis | 67 ++++++++++++++++++++++++++++ talimatname/genel/d/dropbear/talimat | 23 ++++++++++ 2 files changed, 90 insertions(+) create mode 100644 talimatname/genel/d/dropbear/servis create mode 100644 talimatname/genel/d/dropbear/talimat diff --git a/talimatname/genel/d/dropbear/servis b/talimatname/genel/d/dropbear/servis new file mode 100644 index 000000000..489f906c8 --- /dev/null +++ b/talimatname/genel/d/dropbear/servis @@ -0,0 +1,67 @@ +#!/bin/sh +# +# /etc/init.d/dropbear: start/stop dropbear ssh daemon +# + +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/dropbear +PID=/var/run/dropbear.pid + +CONV=/usr/bin/dropbearconvert +KEYG=/usr/bin/dropbearkey + +RSA=/etc/dropbear/dropbear_rsa_host_key +DSS=/etc/dropbear/dropbear_dss_host_key +ECDSA=/etc/dropbear/dropbear_ecdsa_host_key + +create_keys() { + if [ ! -f $RSA ]; then + if [ -f /etc/ssh/ssh_host_rsa_key ]; then + $CONV openssh dropbear /etc/ssh/ssh_host_rsa_key $RSA + else + $KEYG -t rsa -s 4096 -f $RSA + fi + fi + if [ ! -f $DSS ]; then + if [ -f /etc/ssh/ssh_host_dsa_key ]; then + $CONV openssh dropbear /etc/ssh/ssh_host_dsa_key $DSS + else + $KEYG -t dss -f $DSS + fi + fi + if [ ! -f $ECDSA ]; then + if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then + $CONV openssh dropbear /etc/ssh/ssh_host_ecdsa_key $ECDSA + else + $KEYG -t ecdsa -s 521 -f $ECDSA + fi + fi +} + +case $1 in +start) + create_keys + $SSD --start --pidfile $PID --exec $PROG + ;; +stop) + $SSD --stop --retry 10 --pidfile $PID + ;; +restart) + $0 stop + $0 start + ;; +status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running with pid $(cat $PID)" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; +*) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac + +# End of file diff --git a/talimatname/genel/d/dropbear/talimat b/talimatname/genel/d/dropbear/talimat new file mode 100644 index 000000000..86e0b59bf --- /dev/null +++ b/talimatname/genel/d/dropbear/talimat @@ -0,0 +1,23 @@ +# Tanım: Küçük ve güvenli SSH2 sunucu ve istemci uygulaması +# URL: http://matt.ucc.asn.au/dropbear/dropbear.html +# Paketçi: milisarge +# Gerekler: + +isim=dropbear +surum=2017.75 +devir=1 +kaynak=(http://matt.ucc.asn.au/$isim/releases/$isim-$surum.tar.bz2 + servis) + +derle() { + cd $isim-$surum + + sed -i 's|libexec|lib/ssh|; s|bin/X11|bin|' options.h + + ./configure --prefix=/usr + make + make DESTDIR=$PKG install + + install -d $PKG/etc/{rc.d/init.d,dropbear}/ + install -D -m 755 $SRC/servis $PKG/etc/rc.d/init.d/dropbear +}