The midnight-red theme is now meged in the theme-collection. These changes are reflected in the init and update script
24 lines
787 B
Bash
24 lines
787 B
Bash
#!/bin/ash
|
|
#Run folowing commands as 'node' user
|
|
sudo -u node ash << EOF
|
|
#Install nodered
|
|
mkdir -p /opt/node/node-red/app
|
|
npm install --prefix /opt/node/node-red/app node-red @node-red-contrib-themes/theme-collection
|
|
##Add to startup
|
|
|
|
|
|
#Save PM2 statup config
|
|
pm2 start --name nodered --cwd /opt/node/node-red/app ./node_modules/node-red/red.js -- -u /opt/node/node-red/data
|
|
pm2 save
|
|
pm2 kill
|
|
#Enable node-red dark theme
|
|
sed -i -e 's#//theme: "",#theme: "midnight-red",#g' /opt/node/node-red/data/settings.js
|
|
#Disable Node-red flow encription
|
|
sed -i -e 's#//credentialSecret: "a-secret-key",#credentialSecret: false,#g' /opt/node/node-red/data/settings.js
|
|
EOF
|
|
|
|
#Adding update scipt
|
|
mv /opt/Setup/Scripts/Update-NodeRed.sh /opt/Update-NodeRed.sh
|
|
|
|
#Cleanup
|
|
rm -rf /home/node/.npm/_cacache |