Generalization of install.sh.

This commit is contained in:
yohan 2020-03-31 15:01:38 +02:00
parent c1af8b11ab
commit bdb53a2e8a
2 changed files with 5 additions and 3 deletions

View File

@ -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

2
volume_list Normal file
View File

@ -0,0 +1,2 @@
onlyoffice_data
onlyoffice_log