Skip to content
Snippets Groups Projects
Commit 08b465af authored by Bob Mottram's avatar Bob Mottram
Browse files

Get cryptpad config file

parent d28731b4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment