Extra packages

This commit is contained in:
Bob Mottram 2018-05-21 19:47:29 +01:00
parent e570985bfe
commit 0291dbdbf1
1 changed files with 24 additions and 1 deletions

View File

@ -141,6 +141,14 @@ function upgrade_hackmd {
# update to the next commit
set_repo_commit "/etc/hackmd" "hackmd commit" "$HACKMD_COMMIT" "$HACKMD_REPO"
# Remove references to markdown-pdf node package, because it doesn't install on arm
cd /etc/hackmd || return
sed -i '/markdown-pdf/d' lib/response.js
sed -i '/markdownpdf/,/})/d' lib/response.js
mv yarn.lock yarn.lock.old
npm install
chown -R hackmd:hackmd "/etc/hackmd"
systemctl restart hackmd
}
@ -298,8 +306,11 @@ function remove_hackmd {
}
function hackmd_create_config {
hackmd_secret=$(create_password "30")$(create_password "30")$(create_password "30")
{ echo '{';
echo ' "production": {';
echo " \"sessionSecret\": \"$hackmd_secret\",";
echo ' "domain": "localhost",';
echo ' "hsts": {';
echo ' "enable": false,';
@ -395,7 +406,19 @@ function install_hackmd {
npm install lodash
npm install deep-freeze
npm install winston
npm install markdown-pdf
npm install graceful-fs
npm install webpack
npm install extract-text-webpack-plugin
npm install html-webpack-plugin
npm install copy-webpack-plugin
npm install eve
npm install js-sequence-diagrams
#npm install markdown-pdf
sed -i '/markdown-pdf/d' lib/response.js
sed -i '/markdownpdf/,/})/d' lib/response.js
mv yarn.lock yarn.lock.old
npm run build
chmod g+w "/var/www/$HACKMD_DOMAIN_NAME/htdocs"