Generalization of install.sh.
This commit is contained in:
parent
c1af8b11ab
commit
bdb53a2e8a
@ -5,7 +5,7 @@ SCRIPT=$(readlink -f $0)
|
|||||||
SCRIPTPATH=$(dirname $SCRIPT)
|
SCRIPTPATH=$(dirname $SCRIPT)
|
||||||
STACK=$(basename "$SCRIPTPATH")
|
STACK=$(basename "$SCRIPTPATH")
|
||||||
|
|
||||||
for VOLUME in onlyoffice_data onlyoffice_log
|
for VOLUME in $(awk NF $SCRIPTPATH/volume_list | tr -d "[:blank:]")
|
||||||
do
|
do
|
||||||
systemctl enable mnt-cinder-volume@${VOLUME}.service
|
systemctl enable mnt-cinder-volume@${VOLUME}.service
|
||||||
done
|
done
|
||||||
@ -18,7 +18,7 @@ Wants=network-online.target docker.service
|
|||||||
Requires=docker.socket
|
Requires=docker.socket
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
for VOLUME in onlyoffice_data onlyoffice_log
|
for VOLUME in $(awk NF $SCRIPTPATH/volume_list | tr -d "[:blank:]")
|
||||||
do
|
do
|
||||||
cat << EOF >> /etc/systemd/system/${STACK}.service
|
cat << EOF >> /etc/systemd/system/${STACK}.service
|
||||||
After=mnt-cinder-volume@${VOLUME}.service
|
After=mnt-cinder-volume@${VOLUME}.service
|
||||||
@ -39,4 +39,4 @@ ExecStart=$SCRIPTPATH/start.sh
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable docker-onlyoffice-stack.service
|
systemctl enable ${STACK}.service
|
||||||
|
2
volume_list
Normal file
2
volume_list
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
onlyoffice_data
|
||||||
|
onlyoffice_log
|
Loading…
Reference in New Issue
Block a user