Get cryptpad config file

This commit is contained in:
Bob Mottram 2017-05-27 20:49:13 +01:00
parent d28731b4aa
commit 08b465af6a
1 changed files with 10 additions and 6 deletions

View File

@ -489,12 +489,6 @@ function install_cryptpad {
else
sed -i "s|domain:.*|domain: 'http://$CRYPTPAD_ONION_HOSTNAME',|g" config.js
fi
#if [[ $ONION_ONLY != 'no' ]]; then
# sed -i "/module.exports/a ]," config.js
# sed -i "/module.exports/a '\/etc\/ssl\/private\/${CRYPTPAD_DOMAIN_NAME}.key'" config.js
# sed -i "/module.exports/a '\/etc\/ssl\/certs\/${CRYPTPAD_DOMAIN_NAME}.pem'" config.js
# sed -i "/module.exports/a privKeyAndCertFiles: [" config.js
#fi
chown -R cryptpad:cryptpad $CRYPTPAD_DIR
@ -519,6 +513,16 @@ function install_cryptpad {
systemctl daemon-reload
systemctl start cryptpad.service
if [ ! -d $CRYPTPAD_DIR/customize/api ]; then
mkdir -p $CRYPTPAD_DIR/customize/api
fi
wget 127.0.0.1:$CRYPTPAD_PORT/api/config -O $CRYPTPAD_DIR/customize/api/config
if [ ! -f $CRYPTPAD_DIR/customize/api/config ]; then
echo $'Unable to wget api/config'
exit 89252
fi
chown -R cryptpad:cryptpad $CRYPTPAD_DIR
systemctl restart nginx
APP_INSTALLED=1