Search
j0ke.net Open Build Service
>
Projects
>
vhcs
>
courier-imap
> mkimapcert-in.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File mkimapcert-in.diff of Package courier-imap
--- imap/mkimapdcert.in.orig 2007-11-04 21:50:15.000000000 +0100 +++ imap/mkimapdcert.in 2008-02-03 12:20:45.000000000 +0100 @@ -18,41 +18,41 @@ prefix="@prefix@" -if test -f @mydatadir@/imapd.pem +if test -f @sysconfig@/courier-imap/imapd.pem then - echo "@mydatadir@/imapd.pem already exists." + echo "@sysconfig@/courier-imap/imapd.pem already exists." exit 1 fi umask 077 cleanup() { - rm -f @mydatadir@/imapd.pem - rm -f @mydatadir@/imapd.rand - rm -f @mydatadir@/imapd.key - rm -f @mydatadir@/imapd.cert + rm -f @sysconfig@/courier-imap/imapd.pem + rm -f @sysconfig@/courier-imap/imapd.rand + rm -f @sysconfig@/courier-imap/imapd.key + rm -f @sysconfig@/courier-imap/imapd.cert exit 1 } -cd @mydatadir@ +cd @sysconfig@/courier-imap if test "@ssllib@" = "openssl" then - cp /dev/null @mydatadir@/imapd.pem - chmod 600 @mydatadir@/imapd.pem - chown @mailuser@ @mydatadir@/imapd.pem + cp /dev/null @sysconfig@/courier-imap/imapd.pem + chmod 600 @sysconfig@/courier-imap/imapd.pem + chown @mailuser@ @sysconfig@/courier-imap/imapd.pem - dd if=@RANDOMV@ of=@mydatadir@/imapd.rand count=1 2>/dev/null + dd if=@RANDOMV@ of=@sysconfig@/courier-imap/imapd.rand count=1 2>/dev/null @OPENSSL@ req -new -x509 -days 365 -nodes \ - -config @sysconfdir@/imapd.cnf -out @mydatadir@/imapd.pem -keyout @mydatadir@/imapd.pem || cleanup - @OPENSSL@ gendh -rand @mydatadir@/imapd.rand 512 >>@mydatadir@/imapd.pem || cleanup - @OPENSSL@ x509 -subject -dates -fingerprint -noout -in @mydatadir@/imapd.pem || cleanup - rm -f @mydatadir@/imapd.rand + -config @sysconfdir@/imapd.cnf -out @sysconfig@/courier-imap/imapd.pem -keyout @sysconfig@/courier-imap/imapd.pem || cleanup + @OPENSSL@ gendh -rand @sysconfig@/courier-imap/imapd.rand 512 >>@sysconfig@/courier-imap/imapd.pem || cleanup + @OPENSSL@ x509 -subject -dates -fingerprint -noout -in @sysconfig@/courier-imap/imapd.pem || cleanup + rm -f @sysconfig@/courier-imap/imapd.rand else - cp /dev/null @mydatadir@/imapd.key - chmod 600 @mydatadir@/imapd.key - cp /dev/null @mydatadir@/imapd.cert - chmod 600 @mydatadir@/imapd.cert + cp /dev/null @sysconfig@/courier-imap/imapd.key + chmod 600 @sysconfig@/courier-imap/imapd.key + cp /dev/null @sysconfig@/courier-imap/imapd.cert + chmod 600 @sysconfig@/courier-imap/imapd.cert @CERTTOOL@ --generate-privkey --outfile imapd.key @CERTTOOL@ --generate-self-signed --load-privkey imapd.key --outfile imapd.cert --template @sysconfdir@/imapd.cnf