Run cryptpad install script for mesh

This commit is contained in:
Bob Mottram 2017-10-24 11:30:46 +01:00
parent d81a4b0827
commit 25dfda1493
1 changed files with 4 additions and 0 deletions

View File

@ -342,12 +342,16 @@ chown -R cryptpad:cryptpad $CRYPTPAD_DIR
su -c 'bower install' - cryptpad
cp config.example.js config.js
EOF
chmod +x $rootdir/usr/bin/install_cryptpad
chroor "$rootdir" /usr/bin/install_cryptpad
if [ ! -f $rootdir$CRYPTPAD_DIR/config.js ]; then
echo $'Cryptpad config file not found'
exit 628252
fi
rm $rootdir/usr/bin/install_cryptpad
sed -i "s|httpPort:.*|httpPort: $CRYPTPAD_PORT,|g" $rootdir$CRYPTPAD_DIR/config.js
sed -i "s|// domain:|domain:|g" $rootdir$CRYPTPAD_DIR/config.js
sed -i 's|openFileLimit:.*|openFileLimit: 1024,|g' $rootdir$CRYPTPAD_DIR/config.js