use shorter .bak suffix approach
This commit is contained in:
parent
861af62208
commit
9c41ccce58
1 changed files with 7 additions and 8 deletions
|
@ -45,11 +45,10 @@ cp -r $BASE_DIR/config-templates/$CONFIG_TEMPLATE/. ./
|
||||||
|
|
||||||
# Hashes used instead of slashes because we'll get a value back from $(pwd) that'll be
|
# Hashes used instead of slashes because we'll get a value back from $(pwd) that'll be
|
||||||
# full of un-escapable slashes.
|
# full of un-escapable slashes.
|
||||||
# Manually directing output to .templated file and then manually renaming back on top
|
# Use .bak suffix as using no suffix doesn't work macOS.
|
||||||
# of the original file because -i is a nonstandard sed feature which is implemented
|
sed -i.bak "s#{{SYNAPSE_ROOT}}#$(pwd)/#g" homeserver.yaml
|
||||||
# differently, across os X and ubuntu at least
|
sed -i.bak "s#{{SYNAPSE_PORT}}#${PORT}#g" homeserver.yaml
|
||||||
sed "s#{{SYNAPSE_ROOT}}#$(pwd)/#g" homeserver.yaml > homeserver.yaml.templated && mv homeserver.yaml.templated homeserver.yaml
|
sed -i.bak "s#{{FORM_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||||
sed "s#{{SYNAPSE_PORT}}#${PORT}#g" homeserver.yaml > homeserver.yaml.templated && mv homeserver.yaml.templated homeserver.yaml
|
sed -i.bak "s#{{REGISTRATION_SHARED_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||||
sed "s#{{FORM_SECRET}}#$(uuidgen)#g" homeserver.yaml > homeserver.yaml.templated && mv homeserver.yaml.templated homeserver.yaml
|
sed -i.bak "s#{{MACAROON_SECRET_KEY}}#$(uuidgen)#g" homeserver.yaml
|
||||||
sed "s#{{REGISTRATION_SHARED_SECRET}}#$(uuidgen)#g" homeserver.yaml > homeserver.yaml.templated && mv homeserver.yaml.templated homeserver.yaml
|
rm *.bak
|
||||||
sed "s#{{MACAROON_SECRET_KEY}}#$(uuidgen)#g" homeserver.yaml > homeserver.yaml.templated && mv homeserver.yaml.templated homeserver.yaml
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue