make use of mksslcert in start-scripts

This commit is contained in:
Juergen Daubert 2006-02-25 15:42:56 +00:00
parent 26eab6af98
commit 7b4b7536ba
9 changed files with 13 additions and 53 deletions

View File

@ -1,3 +1,3 @@
7d43a691485f8e84ac7dce4e4d5a9d5d dovecot
1c37d911bc42fb40f0ef5a3f5822b170 dovecot
5418f9f7fe99e4f10bb82d9fe504138a dovecot-1.0.beta3.tar.gz
1f361d7d9c263ce4f3bbbb0ce5746411 dovecot-config.patch

View File

@ -3,23 +3,13 @@
# /etc/rc.d/dovecot: start/stop dovecot IMAP/POP3 daemon
#
CRT=/etc/ssl/certs/dovecot.crt
KEY=/etc/ssl/keys/dovecot.key
make_cert() {
FQDN=$(hostname -f) || FQDN=localhost
echo "Creating SSL certificate $CRT for host $FQDN"
INFO=".\n.\n.\n.\n.\n$FQDN\nroot@$FQDN"
OPTS="req -new -nodes -x509 -days 365 -newkey rsa:1024"
echo -e $INFO | openssl $OPTS -out $CRT -keyout $KEY 2> /dev/null
chmod 0600 $CRT $KEY
}
CRT=/etc/ssl/certs/dovecot.crt
case $1 in
start)
if [ ! -s $KEY -o ! -s $CRT ]; then
make_cert
/usr/bin/mksslcert $KEY $CRT
fi
/usr/sbin/dovecot
;;

View File

@ -1,3 +1,3 @@
ad1738ef0302bbb6153b2c3de832fec7 pure-ftpd
0b7a656fc4d50cc638a87668f9079430 pure-ftpd
ca8a8dbec0cd9c8ea92fc4c37ea9c410 pure-ftpd-1.0.21.tar.bz2
306d1de5a60a29ad8b9b664bd272941f pure-ftpd.conf

View File

@ -5,22 +5,13 @@
CONF=/etc/pure-ftpd.conf
ARGS=$(sed -e '/^\s*$/d' -e '/^#/d' $CONF)
CRT=/etc/ssl/certs/pure-ftpd.pem
make_cert() {
FQDN=$(hostname -f) || FQDN=localhost
echo "Creating SSL certificate $CRT for host $FQDN"
INFO=".\n.\n.\n.\n.\n$FQDN\nroot@$FQDN"
OPTS="req -new -nodes -x509 -days 365 -newkey rsa:1024"
echo -e $INFO | openssl $OPTS -out $CRT -keyout $CRT 2> /dev/null
chmod 0600 $CRT
}
case $1 in
start)
if [ ! -s $CRT ]; then
make_cert
/usr/bin/mksslcert $CRT $CRT
fi
/usr/sbin/pure-ftpd $ARGS
;;

View File

@ -1,3 +1,3 @@
20d8078911733e4de22903034e725db6 stunnel
0969cc4868dfd75f22792ecccc9ec555 stunnel-4.14.tar.gz
a01072c2a3a1ff0d2b83834d5fa5557e stunnel.patch
0c511c2a48bc6b899daa409344fc45b8 stunnel.rc

View File

@ -1,15 +1,14 @@
# $Id: Pkgfile,v 1.3 2005/11/06 19:44:23 victord Exp $
# Description: Stunnel wraps normal socket connections with SSL/TLS
# URL: http://www.stunnel.org
# Maintainer: Victor, victord at users dot berlios dot de
# Packager: Jürgen Daubert, juergen dot daubert at t-online dot de
# Maintainer: Jürgen Daubert, juergen dot daubert at t-online dot de
# Depends on: openssl zlib
name=stunnel
version=4.14
release=1
source=(http://www.stunnel.org/download/stunnel/src/$name-$version.tar.gz \
$name.patch $name.rc)
$name.patch $name)
build () {
cd $name-$version
@ -25,7 +24,7 @@ build () {
make
install -D -m 0755 src/stunnel $PKG/usr/sbin/stunnel
install -D -m 0644 doc/stunnel.8 $PKG/usr/man/man8/stunnel.8
install -D -m 0755 $SRC/$name.rc $PKG/etc/rc.d/$name
install -D -m 0755 $SRC/$name $PKG/etc/rc.d/$name
install -m 0644 tools/stunnel.conf-sample $PKG/etc/stunnel.conf
install -d $PKG/{var/run,etc/ssl/{certs,keys}}
install -d -o nobody -g nobody $PKG/var/run/stunnel

View File

@ -6,20 +6,10 @@
CRT=/etc/ssl/certs/stunnel.crt
KEY=/etc/ssl/keys/stunnel.key
make_cert() {
FQDN=$(hostname -f) || FQDN=localhost
echo "Creating SSL certificate $CRT for host $FQDN"
INFO=".\n.\n.\n.\n.\n$FQDN\nroot@$FQDN"
OPTS="req -new -nodes -x509 -days 365 -newkey rsa:1024"
echo -e $INFO | openssl $OPTS -out $CRT -keyout $KEY 2> /dev/null
chmod 0600 $CRT $KEY
}
case $1 in
start)
if [ ! -s $KEY -o ! -s $CRT ]; then
make_cert
/usr/bin/mksslcert $KEY $CRT
fi
/usr/sbin/stunnel
;;

View File

@ -1,3 +1,3 @@
80bebc382e1cc9ee34dabb117f86b9e4 vsftpd
a8e256321a01b4001f967f8ad67a7e99 vsftpd
59ad6f663e9a51d8a6ca1d07118dddaa vsftpd-2.0.4.patch
c0bf8c7b8e15ab15827172786fc56115 vsftpd-2.0.4.tar.gz

View File

@ -5,20 +5,10 @@
CRT=/etc/ssl/certs/vsftpd.pem
make_cert() {
FQDN=$(hostname -f) || FQDN=localhost
echo "Creating SSL certificate $CRT for host $FQDN"
INFO=".\n.\n.\n.\n.\n$FQDN\nroot@$FQDN"
OPTS="req -new -nodes -x509 -days 365 -newkey rsa:1024"
echo -e $INFO | openssl $OPTS -out $CRT -keyout $CRT 2> /dev/null
chmod 0600 $CRT
}
case $1 in
start)
if [ ! -s $CRT ]; then
make_cert
/usr/bin/mksslcert $CRT $CRT
fi
setsid /usr/sbin/vsftpd &
;;