ocserv: log key/cert generation to syslog.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 5 Jun 2014 06:05:29 +0000 (08:05 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 6 Jun 2014 21:18:46 +0000 (23:18 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
net/ocserv/files/ocserv.init

index 57b26d14d6e6ab221710b4c4c2bd6f8ce8fd02ff..54ed0c10b7ef7c7c81ac4764f7bc195a00820f9d 100644 (file)
@@ -115,7 +115,7 @@ start() {
        [ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname`
 
        [ ! -f /etc/ocserv/ca-key.pem ] && [ -x /usr/bin/certtool ] && {
-               echo "Generating CA certificate..."
+               logger -t ocserv "Generating CA certificate..."
                mkdir -p /etc/ocserv/pki/
                certtool --bits 2048 --generate-privkey --outfile /etc/ocserv/ca-key.pem >/dev/null 2>&1
                echo "cn=$hostname CA" >/etc/ocserv/pki/ca.tmpl
@@ -131,7 +131,7 @@ start() {
 
        #generate server certificate/key
        [ ! -f /etc/ocserv/server-key.pem ] && [ -x /usr/bin/certtool ] && {
-               echo "Generating server certificate..."
+               logger -t ocserv "Generating server certificate..."
                mkdir -p /etc/ocserv/pki/
                certtool --bits 2048 --generate-privkey --outfile /etc/ocserv/server-key.pem >/dev/null 2>&1
                echo "cn=$hostname" >/etc/ocserv/pki/server.tmpl