diff options
author | Gustavo Felisberto <humpback@gentoo.org> | 2005-04-10 18:10:56 +0000 |
---|---|---|
committer | Gustavo Felisberto <humpback@gentoo.org> | 2005-04-10 18:10:56 +0000 |
commit | 1512ea8962bc1d22a4a50366bec7a2270e301b4a (patch) | |
tree | a346d3914ab6aeb08997a12a7a5bdc1b9bb29b84 /net-im/ejabberd | |
parent | gcc-4 fix (diff) | |
download | gentoo-2-1512ea8962bc1d22a4a50366bec7a2270e301b4a.tar.gz gentoo-2-1512ea8962bc1d22a4a50366bec7a2270e301b4a.tar.bz2 gentoo-2-1512ea8962bc1d22a4a50366bec7a2270e301b4a.zip |
added ssl certificate generator script
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-im/ejabberd')
-rw-r--r-- | net-im/ejabberd/ChangeLog | 6 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-0.7.5.ebuild | 10 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-0.7.5.initd | 4 | ||||
-rwxr-xr-x | net-im/ejabberd/files/self-cert.sh | 21 |
4 files changed, 37 insertions, 4 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog index 03400868523e..7f32b42bcb7d 100644 --- a/net-im/ejabberd/ChangeLog +++ b/net-im/ejabberd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-im/ejabberd # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.1 2005/04/08 20:02:35 humpback Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.2 2005/04/10 18:10:56 humpback Exp $ + + 10 Apr 2005; Gustavo Felisberto <humpback@gentoo.org>; + files/ejabberd-0.7.5.initd, +files/self-cert.sh, ejabberd-0.7.5.ebuild: + Added ssl.pem generator script and einfo. *ejabberd-0.7.5 (08 Apr 2005) diff --git a/net-im/ejabberd/ejabberd-0.7.5.ebuild b/net-im/ejabberd/ejabberd-0.7.5.ebuild index d4e791d3d0e1..56d650a4e355 100644 --- a/net-im/ejabberd/ejabberd-0.7.5.ebuild +++ b/net-im/ejabberd/ejabberd-0.7.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-0.7.5.ebuild,v 1.1 2005/04/08 20:02:35 humpback Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-0.7.5.ebuild,v 1.2 2005/04/10 18:10:56 humpback Exp $ inherit eutils @@ -69,6 +69,9 @@ src_install() { exeinto /etc/init.d newexe ${FILESDIR}/ejabberd-0.7.5.initd ejabberd + if use ssl ; then + doexe ${FILESDIR}/self-cert.sh + fi insinto /etc/conf.d newins ${FILESDIR}/ejabberd-0.7.5.confd ejabberd @@ -87,4 +90,9 @@ pkg_postinst() { einfo "Please copy it to /etc/ejabberd/ejabberd.cfg and edit it according to your needs." einfo "For configuration instructions, please see /usr/share/doc/${P}/html/guide.html" fi + if use ssl ; then + einfo "A script to generate a ssl key has been installed in" + einfo "/etc/ejabberd/self-cert.sh . Use it and change the config file to" + einfo "point to the full path" + fi } diff --git a/net-im/ejabberd/files/ejabberd-0.7.5.initd b/net-im/ejabberd/files/ejabberd-0.7.5.initd index 6a718124b59c..794035aa1b69 100644 --- a/net-im/ejabberd/files/ejabberd-0.7.5.initd +++ b/net-im/ejabberd/files/ejabberd-0.7.5.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-0.7.5.initd,v 1.2 2005/04/08 21:34:06 humpback Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-0.7.5.initd,v 1.3 2005/04/10 18:10:56 humpback Exp $ opts="${opts} reload" @@ -21,7 +21,7 @@ checkconfig() { start() { checkconfig || return 1 ebegin "Starting eJabberd" - start-stop-daemon --start --quiet --chuid ejabberd:jabberd \ + start-stop-daemon --start --quiet --chuid ejabberd:jabber \ --exec /usr/bin/env HOME=/var/run/ejabberd /usr/bin/ejabberd -- -noshell -detached eend $? } diff --git a/net-im/ejabberd/files/self-cert.sh b/net-im/ejabberd/files/self-cert.sh new file mode 100755 index 000000000000..2c984fd9dde4 --- /dev/null +++ b/net-im/ejabberd/files/self-cert.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +###### +# +# Generate a certificate and key with no passphrase. +# +###### + +OPENSSL=/usr/bin/openssl + +## This generates the cert and key +$OPENSSL req -new -x509 -newkey rsa:1024 -keyout /tmp/privkey.pem -out /etc/ejabberd/ssl.pem +## This will remove the passphrase +$OPENSSL rsa -in /tmp/privkey.pem -out /tmp/privkey.pem +## Put it all together +cat /tmp/privkey.pem >> /etc/ejabberd/ssl.pem +## Cleanup +rm /tmp/privkey.pem +echo "" +echo "Your new key is /etc/ejabberd/ssl.pem" +echo "" |