make use of mksslcert in start-scripts
This commit is contained in:
parent
26eab6af98
commit
7b4b7536ba
@ -1,3 +1,3 @@
|
|||||||
7d43a691485f8e84ac7dce4e4d5a9d5d dovecot
|
1c37d911bc42fb40f0ef5a3f5822b170 dovecot
|
||||||
5418f9f7fe99e4f10bb82d9fe504138a dovecot-1.0.beta3.tar.gz
|
5418f9f7fe99e4f10bb82d9fe504138a dovecot-1.0.beta3.tar.gz
|
||||||
1f361d7d9c263ce4f3bbbb0ce5746411 dovecot-config.patch
|
1f361d7d9c263ce4f3bbbb0ce5746411 dovecot-config.patch
|
||||||
|
@ -3,23 +3,13 @@
|
|||||||
# /etc/rc.d/dovecot: start/stop dovecot IMAP/POP3 daemon
|
# /etc/rc.d/dovecot: start/stop dovecot IMAP/POP3 daemon
|
||||||
#
|
#
|
||||||
|
|
||||||
CRT=/etc/ssl/certs/dovecot.crt
|
|
||||||
KEY=/etc/ssl/keys/dovecot.key
|
KEY=/etc/ssl/keys/dovecot.key
|
||||||
|
CRT=/etc/ssl/certs/dovecot.crt
|
||||||
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
|
case $1 in
|
||||||
start)
|
start)
|
||||||
if [ ! -s $KEY -o ! -s $CRT ]; then
|
if [ ! -s $KEY -o ! -s $CRT ]; then
|
||||||
make_cert
|
/usr/bin/mksslcert $KEY $CRT
|
||||||
fi
|
fi
|
||||||
/usr/sbin/dovecot
|
/usr/sbin/dovecot
|
||||||
;;
|
;;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
ad1738ef0302bbb6153b2c3de832fec7 pure-ftpd
|
0b7a656fc4d50cc638a87668f9079430 pure-ftpd
|
||||||
ca8a8dbec0cd9c8ea92fc4c37ea9c410 pure-ftpd-1.0.21.tar.bz2
|
ca8a8dbec0cd9c8ea92fc4c37ea9c410 pure-ftpd-1.0.21.tar.bz2
|
||||||
306d1de5a60a29ad8b9b664bd272941f pure-ftpd.conf
|
306d1de5a60a29ad8b9b664bd272941f pure-ftpd.conf
|
||||||
|
@ -5,22 +5,13 @@
|
|||||||
|
|
||||||
CONF=/etc/pure-ftpd.conf
|
CONF=/etc/pure-ftpd.conf
|
||||||
ARGS=$(sed -e '/^\s*$/d' -e '/^#/d' $CONF)
|
ARGS=$(sed -e '/^\s*$/d' -e '/^#/d' $CONF)
|
||||||
|
|
||||||
CRT=/etc/ssl/certs/pure-ftpd.pem
|
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
|
case $1 in
|
||||||
start)
|
start)
|
||||||
if [ ! -s $CRT ]; then
|
if [ ! -s $CRT ]; then
|
||||||
make_cert
|
/usr/bin/mksslcert $CRT $CRT
|
||||||
fi
|
fi
|
||||||
/usr/sbin/pure-ftpd $ARGS
|
/usr/sbin/pure-ftpd $ARGS
|
||||||
;;
|
;;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
|
20d8078911733e4de22903034e725db6 stunnel
|
||||||
0969cc4868dfd75f22792ecccc9ec555 stunnel-4.14.tar.gz
|
0969cc4868dfd75f22792ecccc9ec555 stunnel-4.14.tar.gz
|
||||||
a01072c2a3a1ff0d2b83834d5fa5557e stunnel.patch
|
a01072c2a3a1ff0d2b83834d5fa5557e stunnel.patch
|
||||||
0c511c2a48bc6b899daa409344fc45b8 stunnel.rc
|
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
# $Id: Pkgfile,v 1.3 2005/11/06 19:44:23 victord Exp $
|
# $Id: Pkgfile,v 1.3 2005/11/06 19:44:23 victord Exp $
|
||||||
# Description: Stunnel wraps normal socket connections with SSL/TLS
|
# Description: Stunnel wraps normal socket connections with SSL/TLS
|
||||||
# URL: http://www.stunnel.org
|
# URL: http://www.stunnel.org
|
||||||
# Maintainer: Victor, victord at users dot berlios dot de
|
# Maintainer: Jürgen Daubert, juergen dot daubert at t-online dot de
|
||||||
# Packager: Jürgen Daubert, juergen dot daubert at t-online dot de
|
|
||||||
# Depends on: openssl zlib
|
# Depends on: openssl zlib
|
||||||
|
|
||||||
name=stunnel
|
name=stunnel
|
||||||
version=4.14
|
version=4.14
|
||||||
release=1
|
release=1
|
||||||
source=(http://www.stunnel.org/download/stunnel/src/$name-$version.tar.gz \
|
source=(http://www.stunnel.org/download/stunnel/src/$name-$version.tar.gz \
|
||||||
$name.patch $name.rc)
|
$name.patch $name)
|
||||||
|
|
||||||
build () {
|
build () {
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
@ -25,7 +24,7 @@ build () {
|
|||||||
make
|
make
|
||||||
install -D -m 0755 src/stunnel $PKG/usr/sbin/stunnel
|
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 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 -m 0644 tools/stunnel.conf-sample $PKG/etc/stunnel.conf
|
||||||
install -d $PKG/{var/run,etc/ssl/{certs,keys}}
|
install -d $PKG/{var/run,etc/ssl/{certs,keys}}
|
||||||
install -d -o nobody -g nobody $PKG/var/run/stunnel
|
install -d -o nobody -g nobody $PKG/var/run/stunnel
|
||||||
|
@ -6,20 +6,10 @@
|
|||||||
CRT=/etc/ssl/certs/stunnel.crt
|
CRT=/etc/ssl/certs/stunnel.crt
|
||||||
KEY=/etc/ssl/keys/stunnel.key
|
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
|
case $1 in
|
||||||
start)
|
start)
|
||||||
if [ ! -s $KEY -o ! -s $CRT ]; then
|
if [ ! -s $KEY -o ! -s $CRT ]; then
|
||||||
make_cert
|
/usr/bin/mksslcert $KEY $CRT
|
||||||
fi
|
fi
|
||||||
/usr/sbin/stunnel
|
/usr/sbin/stunnel
|
||||||
;;
|
;;
|
@ -1,3 +1,3 @@
|
|||||||
80bebc382e1cc9ee34dabb117f86b9e4 vsftpd
|
a8e256321a01b4001f967f8ad67a7e99 vsftpd
|
||||||
59ad6f663e9a51d8a6ca1d07118dddaa vsftpd-2.0.4.patch
|
59ad6f663e9a51d8a6ca1d07118dddaa vsftpd-2.0.4.patch
|
||||||
c0bf8c7b8e15ab15827172786fc56115 vsftpd-2.0.4.tar.gz
|
c0bf8c7b8e15ab15827172786fc56115 vsftpd-2.0.4.tar.gz
|
||||||
|
@ -5,20 +5,10 @@
|
|||||||
|
|
||||||
CRT=/etc/ssl/certs/vsftpd.pem
|
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
|
case $1 in
|
||||||
start)
|
start)
|
||||||
if [ ! -s $CRT ]; then
|
if [ ! -s $CRT ]; then
|
||||||
make_cert
|
/usr/bin/mksslcert $CRT $CRT
|
||||||
fi
|
fi
|
||||||
setsid /usr/sbin/vsftpd &
|
setsid /usr/sbin/vsftpd &
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user