From 8f3122588bf210f5be4fd2c1e693b8ab4976cdf9 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Tue, 10 Jul 2018 23:09:17 +0100 Subject: [PATCH] Add contrib/crcert.sh to mkrelease.sh --- contrib/crcert.sh | 7 ++++++- mkrelease.sh | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/crcert.sh b/contrib/crcert.sh index 1a5e70f..8690056 100755 --- a/contrib/crcert.sh +++ b/contrib/crcert.sh @@ -1,6 +1,11 @@ #!/bin/sh -[ -d /etc/mympd/ssl ] && rm -r /etc/mympd/ssl +if [ -d /etc/mympd/ssl ] +then + echo "SSL directory exists, to recreate certificates: \"rm -r /etc/mympd/ssl\"" + exit 1 +fi + mkdir -p /etc/mympd/ssl/ca/certs cd /etc/mympd/ssl/ca diff --git a/mkrelease.sh b/mkrelease.sh index 2e7324f..9a47621 100755 --- a/mkrelease.sh +++ b/mkrelease.sh @@ -39,5 +39,7 @@ sudo chown nobody /var/lib/mympd [ -d /etc/default ] && \ sudo cp -v contrib/mympd.default /etc/default/mympd + +[ -d /etc/mympd/ssl ] || contrib/crcert.sh echo "myMPD installed"