summaryrefslogtreecommitdiff
path: root/scripts/kvmd-gencert
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-10-16 14:53:27 +0300
committerDevaev Maxim <[email protected]>2019-10-16 14:53:27 +0300
commit62dd6b96b5f9525595375f58b54bb278bfe18eab (patch)
tree54f8bcd772735726c7ba8a814ddc99efd777f271 /scripts/kvmd-gencert
parent7d1afc869cfdefb811d72361c5ba2e8334cd71da (diff)
kvmd-gencert --do-the-thing
Diffstat (limited to 'scripts/kvmd-gencert')
-rwxr-xr-xscripts/kvmd-gencert9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/kvmd-gencert b/scripts/kvmd-gencert
index 43e89e08..90f28485 100755
--- a/scripts/kvmd-gencert
+++ b/scripts/kvmd-gencert
@@ -24,11 +24,20 @@
set -x
set -e
+export LC_ALL=C
+
if [ `whoami` != root ]; then
echo "Only root can do that"
exit 1
fi
+if [ "$1" != --do-the-thing ]; then
+ echo "This script will generate new self-signed SSL certificates for KVMD Nginx"
+ echo "and put them to /etc/kvmd/nginx/ssl. If you're sure of what you're doing,"
+ echo "append the option '--do-the-thing' to execute."
+ exit 1
+fi
+
mkdir -p /etc/kvmd/nginx/ssl
cd /etc/kvmd/nginx/ssl