Extra packages
This commit is contained in:
parent
e570985bfe
commit
0291dbdbf1
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue