Auto-creation of volumes mountpoint with sudo...

This commit is contained in:
yohan 2020-02-26 18:20:33 +01:00
parent 7ce80f9f12
commit 859bdf07f6

View File

@ -2,7 +2,7 @@
# --force-recreate is used to recreate container when crontab file has changed # --force-recreate is used to recreate container when crontab file has changed
source ~/openrc.sh source ~/openrc.sh
INSTANCE=$(/home/yohan/env_py3/bin/openstack server show -c id --format value $(hostname)) INSTANCE=$(/home/yohan/env_py3/bin/openstack server show -c id --format value $(hostname))
mkdir -p /mnt/volumes/elasticsearch_data sudo mkdir -p /mnt/volumes/elasticsearch_data
if ! mountpoint -q /mnt/volumes/elasticsearch_data if ! mountpoint -q /mnt/volumes/elasticsearch_data
then then
VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show elasticsearch_data -c id --format value) VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show elasticsearch_data -c id --format value)