From bdb53a2e8a63f3f193a0d9b310369acb1564ac32 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Tue, 31 Mar 2020 15:01:38 +0200 Subject: [PATCH] Generalization of install.sh. --- install.sh | 6 +++--- volume_list | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 volume_list diff --git a/install.sh b/install.sh index 1c88d49..a1e79a3 100755 --- a/install.sh +++ b/install.sh @@ -5,7 +5,7 @@ SCRIPT=$(readlink -f $0) SCRIPTPATH=$(dirname $SCRIPT) STACK=$(basename "$SCRIPTPATH") -for VOLUME in onlyoffice_data onlyoffice_log +for VOLUME in $(awk NF $SCRIPTPATH/volume_list | tr -d "[:blank:]") do systemctl enable mnt-cinder-volume@${VOLUME}.service done @@ -18,7 +18,7 @@ Wants=network-online.target docker.service Requires=docker.socket EOF -for VOLUME in onlyoffice_data onlyoffice_log +for VOLUME in $(awk NF $SCRIPTPATH/volume_list | tr -d "[:blank:]") do cat << EOF >> /etc/systemd/system/${STACK}.service After=mnt-cinder-volume@${VOLUME}.service @@ -39,4 +39,4 @@ ExecStart=$SCRIPTPATH/start.sh WantedBy=multi-user.target EOF systemctl daemon-reload -systemctl enable docker-onlyoffice-stack.service +systemctl enable ${STACK}.service diff --git a/volume_list b/volume_list new file mode 100644 index 0000000..853d0bb --- /dev/null +++ b/volume_list @@ -0,0 +1,2 @@ +onlyoffice_data +onlyoffice_log