From a4cd2faf21531666e96c4001e1fef27a375a509f Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Wed, 25 Nov 2015 09:54:47 +0200
Subject: [PATCH] Rename server pid file to be hidden.

---
 .gitignore | 2 +-
 Makefile   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index dc0ffec..a7e130a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,4 @@ openssl.cnf
 CA.key
 CA.crt
 CA.p12
-server.pid
+.server.pid
diff --git a/Makefile b/Makefile
index cc14422..2acc31b 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ install:
 	chmod 755 /usr/local/bin/ssl-ca
 
 clean:
-	rm -rf openssl.cnf certs keys CA.key CA.crt CA.p12
+	rm -rf openssl.cnf certs keys CA.key CA.crt CA.p12 .server.pid
 
 test: clean
 	./ssl-ca init
@@ -28,6 +28,6 @@ test: clean
 	test "$$(openssl x509 -in certs/www -subject -noout)" = "subject= /CN=www.ssl-ca"
 	test "$$(openssl x509 -in certs/smtp -issuer -noout)" = "issuer= /CN=ssl-ca"
 	test "$$(openssl x509 -in certs/smtp -subject -noout)" = "subject= /CN=smtp.ssl-ca"
-	openssl s_server -accept 8080 -cert certs/www -key keys/www -CAfile CA.crt & echo "$$!" > server.pid
-	kill "$$(cat server.pid)"
-	rm server.pid
+	openssl s_server -accept 15876 -cert certs/www -key keys/www -CAfile CA.crt -quiet & echo "$$!" > .server.pid
+	kill "$$(cat .server.pid)"
+	rm .server.pid
-- 
GitLab