Auto-creation of volumes mountpoint with sudo...
This commit is contained in:
parent
8e467b7509
commit
640163f4b3
4
start.sh
4
start.sh
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
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/onlyoffice_data
|
sudo mkdir -p /mnt/volumes/onlyoffice_data
|
||||||
if ! mountpoint -q /mnt/volumes/onlyoffice_data
|
if ! mountpoint -q /mnt/volumes/onlyoffice_data
|
||||||
then
|
then
|
||||||
VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_data -c id --format value)
|
VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_data -c id --format value)
|
||||||
@ -9,7 +9,7 @@ then
|
|||||||
sleep 3
|
sleep 3
|
||||||
sudo mount /dev/disk/by-id/*${VOLUME_ID:0:20} /mnt/volumes/onlyoffice_data
|
sudo mount /dev/disk/by-id/*${VOLUME_ID:0:20} /mnt/volumes/onlyoffice_data
|
||||||
fi
|
fi
|
||||||
mkdir -p /mnt/volumes/onlyoffice_log
|
sudo mkdir -p /mnt/volumes/onlyoffice_log
|
||||||
if ! mountpoint -q /mnt/volumes/onlyoffice_log
|
if ! mountpoint -q /mnt/volumes/onlyoffice_log
|
||||||
then
|
then
|
||||||
VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_log -c id --format value)
|
VOLUME_ID=$(/home/yohan/env_py3/bin/openstack volume show onlyoffice_log -c id --format value)
|
||||||
|
Loading…
Reference in New Issue
Block a user