21 lines
692 B
Bash
21 lines
692 B
Bash
|
#!/bin/sh
|
||
|
# Based on https://github.com/owncloud/ocis/blob/master/deployments/examples/ocis_wopi/config/wopiserver/entrypoint-override.sh
|
||
|
set -e
|
||
|
|
||
|
if test "${WOPI_SECRET:-undefined}" != undefined
|
||
|
then
|
||
|
echo "$WOPI_SECRET" > /etc/wopi/wopi.secret
|
||
|
elif test "${WOPI_SECRET_FILE:-undefined}" != undefined
|
||
|
then
|
||
|
ln -s "$WOPI_SECRET_FILE" /etc/wopi/wopi.secret
|
||
|
# or, preferrably, just mount /etc/wopi/wopi.secret as a read-only bind mount
|
||
|
fi
|
||
|
|
||
|
sed "s/PUBLIC_URL/$PUBLIC_URL/g" < /etc/wopi/wopiserver.conf.dist > /etc/wopi/wopiserver.conf
|
||
|
|
||
|
if [ "$WOPISERVER_INSECURE" == "true" ]; then
|
||
|
sed -i 's/sslverify\s=\sTrue/sslverify = False/g' /etc/wopi/wopiserver.conf
|
||
|
fi
|
||
|
|
||
|
exec /app/wopiserver.py
|