On Fri, Nov 20, 2009 at 05:06:36PM +0100, J.Daniel Schmidt wrote: > ref: refs/heads/master > commit d911631162b51d8145bcf1c9d1c53eb69aa50332 > Author: J. Daniel Schmidt <[email protected]> > Date: Fri Nov 20 17:06:36 2009 +0100 > > create ssl certificate when starting webclient the first time (bnc#550395) > --- > webclient/config/lighttpd.conf | 2 +- > webclient/package/yast2-webclient.spec | 7 +++---- > webclient/package/yastwc | 12 ++++++++++++ > 3 files changed, 16 insertions(+), 5 deletions(-) > ... > diff --git a/webclient/package/yastwc b/webclient/package/yastwc > index d97c005..207e12b 100755 > --- a/webclient/package/yastwc > +++ b/webclient/package/yastwc > @@ -128,6 +128,11 @@ test -r $LIGHTTPD_CONFIG || { echo "$LIGHTTPD_CONFIG not > existing"; > PID_FILE=/var/run/yastwc.pid > IGNORE_FILE=/var/run/yastws.pid > > + > +CERTIFICATEFILE=/etc/lighttpd/certs/webyast.pem > +CERTKEYFILE=/etc/lighttpd/certs/webyast.key > +COMBINEDCERTFILE=/etc/lighttpd/certs/webyast-combined.pem > + > # Source LSB init functions > # providing start_daemon, killproc, pidofproc, > # log_success_msg, log_failure_msg and log_warning_msg. > @@ -171,6 +176,13 @@ rc_reset > > case "$1" in > start) > + if [ ! -e $COMBINEDCERTFILE ] > + then > + echo "No certificate found. Creating one now." > + /usr/sbin/check-create-certificate.pl -c -C $CERTIFICATEFILE -K > $CERTKEYFILE -B $COMBINEDCERTFILE >/dev/null 2>&1
Do not throw away errors, especially if they can affect the operation of the entire web client. Others will not thank you after wasting time on trying to figure out what went wrong. How about >/srv/www/yast/log/check-create-certificate.log 2>&1 > + chown lighttpd:lighttpd $CERTIFICATEFILE $CERTKEYFILE > $COMBINEDCERTFILE > + fi > + > echo -n "Starting yastwc " > startproc -p $PID_FILE -i $IGNORE_FILE $LIGHTTPD_BIN -f > $LIGHTTPD_CONFIG > > -- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
pgpekdxxOOe3g.pgp
Description: PGP signature
