From 640163f4b3bca6683027c06a4c5c9c18c638dc01 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Wed, 26 Feb 2020 18:42:45 +0100 Subject: [PATCH] Auto-creation of volumes mountpoint with sudo... --- start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 05f9c38..1bb921e 100755 --- a/start.sh +++ b/start.sh @@ -1,7 +1,7 @@ #!/bin/bash source ~/openrc.sh INSTANCE=$(/home/yohan/env_py3/bin/openstack server show -c id --format value $(hostname)) -mkdir -p /mnt/volumes/onlyoffice_data +sudo mkdir -p /mnt/volumes/onlyoffice_data if ! mountpoint -q /mnt/volumes/onlyoffice_data then VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_data -c id --format value) @@ -9,7 +9,7 @@ then sleep 3 sudo mount /dev/disk/by-id/*${VOLUME_ID:0:20} /mnt/volumes/onlyoffice_data fi -mkdir -p /mnt/volumes/onlyoffice_log +sudo mkdir -p /mnt/volumes/onlyoffice_log if ! mountpoint -q /mnt/volumes/onlyoffice_log then VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_log -c id --format value)