Add error-handling for permission of /etc/octavia
create_certificates.sh requires permission of /etc/octavia basically and creates certificates under that. If not granting enough permission the script creates these files under current directory and that makes mess. So this patch adds minimum error-handling for avoiding that. Change-Id: I5166329a7c45c8f17890f11af99bedb206144de5
This commit is contained in:
parent
ff1a4761be
commit
6c0af86e4c
@ -41,7 +41,15 @@ echo $CERT_DIR
|
||||
|
||||
mkdir -p $CERT_DIR
|
||||
cd $CERT_DIR
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Failed to change to $CERT_DIR. Check the existence and permission"
|
||||
exit 1
|
||||
fi
|
||||
mkdir newcerts private
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Failed to create directories. Check the permission"
|
||||
exit 1
|
||||
fi
|
||||
chmod 700 private
|
||||
|
||||
# prepare files
|
||||
|
Loading…
x
Reference in New Issue
Block a user