-
-
Save bigmonkeyboy/9962293 to your computer and use it in GitHub Desktop.
Revisions
-
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,4 @@ To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults or click [right-click "save as" this link](https://gist.github.com/bigmonkeyboy/9962293/raw/dfeadcf3d9a46dbcc2c5463cbeb13733d697d5cb/nodered) - But please read the script first and satisfy yourself it's safe to execute in your environment... -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,8 @@ To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults or click [right-click "save as" this link](https://gist.github.com/bigmonkeyboy/9962293/raw/dfeadcf3d9a46dbcc2c5463cbeb13733d697d5cb/nodered) - But please read the script first and satisfy yourself it's safe to execute in your environment...[^n] >is this quoted ? [^n]: ref goes here -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 0 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,16 +5,3 @@ To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults or click [right-click "save as" this link](https://gist.github.com/bigmonkeyboy/9962293/raw/dfeadcf3d9a46dbcc2c5463cbeb13733d697d5cb/nodered) - But please read the script first and satisfy yourself it's safe to execute in your environment... -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,3 +6,15 @@ To run it as a single step you can cut paste the following single line command or click [right-click "save as" this link](https://gist.github.com/bigmonkeyboy/9962293/raw/dfeadcf3d9a46dbcc2c5463cbeb13733d697d5cb/nodered) - But please read the script first and satisfy yourself it's safe to execute in your environment... ```javascript var some = "code"; for { var i=0; i < 10; i++) { print "ping"; } ``` ```Shell echo "hello Dave" return 0 ``` -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 1 addition and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,12 +4,5 @@ To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults or click [right-click "save as" this link](https://gist.github.com/bigmonkeyboy/9962293/raw/dfeadcf3d9a46dbcc2c5463cbeb13733d697d5cb/nodered) - But please read the script first and satisfy yourself it's safe to execute in your environment... -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,3 +5,11 @@ To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults or click [this link](https://gist.github.com/bigmonkeyboy/9962293/raw/dfeadcf3d9a46dbcc2c5463cbeb13733d697d5cb/nodered) - But please read the script first and satisfy yourself it's safe to execute in your environment... ###Some code ### #!javascript function hi(){ alert('hi!'); } -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,4 @@ To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults or click [this link](https://gist.githubusercontent.com/bigmonkeyboy/9962293/raw/dfeadcf3d9a46dbcc2c5463cbeb13733d697d5cb/nodered) - But please read the script first and satisfy yourself it's safe to execute in your environment... -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,3 +3,5 @@ This gist creates an init.d script to automatically run Node-RED at boot time. To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults or click [this link](https://gist.github.com/bigmonkeyboy/9962293/download) - But please read the script first and satisfy yourself it's safe to execute in your environment... -
bigmonkeyboy revised this gist
Mar 4, 2015 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ This gist creates an init.d script to automatically run Node-RED at boot time. To run it as a single step you can cut paste the following single line command sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults -
bigmonkeyboy revised this gist
Mar 1, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ LOG=/var/log/node-red.log case "$1" in start) if pgrep ^node-red$ > /dev/null then echo "Node-RED already running." else -
bigmonkeyboy revised this gist
Mar 1, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ LOG=/var/log/node-red.log case "$1" in start) if pgrep ^node-red$ | grep -v grep > /dev/null then echo "Node-RED already running." else -
bigmonkeyboy revised this gist
Mar 1, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ stop) echo "Stopping Node-Red.." # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT ^node-red$ sleep 2 echo "" >> $LOG echo "Node-RED service stop: "$(date) >> $LOG -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,6 +43,7 @@ stop) # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT node-red sleep 2 echo "" >> $LOG echo "Node-RED service stop: "$(date) >> $LOG ;; -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,10 +22,10 @@ LOG=/var/log/node-red.log case "$1" in start) if ps aux | grep "node-red" | grep -v '/node-red' | grep -v grep > /dev/null then echo "Node-RED already running." else echo "Starting Node-Red.." touch $LOG chown $USER:$USER $LOG @@ -35,16 +35,16 @@ start) # or su -l $USER -c "node-red-pi --max-old-space-size=128 -u ~/.node-red >> $LOG &" echo "Logging to "$LOG fi ;; stop) echo "Stopping Node-Red.." # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT node-red echo "" >> $LOG echo "Node-RED service stop: "$(date) >> $LOG ;; restart) -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,8 @@ start) echo "Starting Node-Red.." touch $LOG chown $USER:$USER $LOG echo "" >> $LOG echo "Node-RED service start: "$(date) >> $LOG # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red-pi --max-old-space-size=128 -u ~/.node-red >> $LOG &" -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,8 @@ stop) # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT node-red echo "" >> $LOG echo "Node-RED service stop: "$(date) >> $LOG ;; restart) -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ start) echo "Starting Node-Red.." touch $LOG chown $USER:$USER $LOG echo -e "\nNode-RED service start: "$(date) >> $LOG # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red-pi --max-old-space-size=128 -u ~/.node-red >> $LOG &" @@ -42,7 +42,7 @@ stop) # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT node-red echo -e "\nNode-RED service stop: "$(date) >> $LOG ;; restart) -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,10 @@ LOG=/var/log/node-red.log case "$1" in start) if ps aux | grep "node-red" | grep -v '/node-red' | grep -v grep > /dev/null then echo "Node-RED already running." else echo "Starting Node-Red.." touch $LOG chown $USER:$USER $LOG @@ -30,6 +34,7 @@ start) # or su -l $USER -c "node-red-pi --max-old-space-size=128 -u ~/.node-red >> $LOG &" echo "Logging to "$LOG fi ;; stop) -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,6 +25,7 @@ start) echo "Starting Node-Red.." touch $LOG chown $USER:$USER $LOG echo "Node-RED service start: "$(date) >> $LOG # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red-pi --max-old-space-size=128 -u ~/.node-red >> $LOG &" @@ -36,6 +37,7 @@ stop) # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT node-red echo "Node-RED service stop: "$(date) >> $LOG ;; restart) -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ # Short-Description: Node-RED initialisation ### END INIT INFO # Can be downloaded and installed in one go by using this command # sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults # This runs as the user called pi - please change as you require USER=pi -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ # Short-Description: Node-RED initialisation ### END INIT INFO # Can be downloaded and installed in one go by using this command # sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d node-red defaults # This runs as the user called pi - please change as you require USER=pi -
bigmonkeyboy renamed this gist
Feb 28, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #! /bin/sh # Starts and stops Node-RED # /etc/init.d/nodered ### BEGIN INIT INFO # Provides: node-red # Required-Start: $syslog -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,6 @@ case "$1" in start) echo "Starting Node-Red.." touch $LOG chown $USER:$USER $LOG # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" @@ -37,13 +36,14 @@ stop) # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT node-red ;; restart) echo "Restarting Node-Red.." $0 stop sleep 2 $0 start echo "Restarted." ;; *) echo "Usage: $0 {start|stop|restart}" -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,7 @@ case "$1" in start) echo "Starting Node-Red.." sleep 2 touch $LOG chown $USER:$USER $LOG # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" -
bigmonkeyboy revised this gist
Feb 28, 2015 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,16 +16,18 @@ USER=pi # The log is written to here - please make sure your user has write permissions. LOG=/var/log/node-red.log #Load up node red when called case "$1" in start) echo "Starting Node-Red.." touch $LOG chown $USER:$USER $LOG # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red-pi --max-old-space-size=128 -u ~/.node-red >> $LOG &" echo "Logging to "$LOG ;; -
bigmonkeyboy revised this gist
Feb 27, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ start) echo "Starting Node-Red.." # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red-pi --max-old-space-size=128 -u ~/.node-red > $LOG &" echo "Logging to "$LOG ;; -
bigmonkeyboy revised this gist
Feb 27, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,8 @@ stop) echo "Stopping Node-Red.." # su -l $USER -c "screen -S red -X quit" # or pkill -SIGINT node-red sleep 1 ;; restart) -
bigmonkeyboy revised this gist
Feb 27, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,7 @@ start) # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red -u ~/.node-red > $LOG &" echo "Logging to "$LOG ;; stop) -
bigmonkeyboy revised this gist
Feb 27, 2015 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,17 +12,20 @@ # Can be downloaded and installed in one go by using this command # sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/node-red && sudo update-rc.d node-red defaults # This runs as the user called pi - please change as you require USER=pi # The log is written to here - please make sure your user has write permissions. LOG=/tmp/node-red.log #Load up node red when called case "$1" in start) echo "Starting Node-Red.." # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red -u ~/.node-red > $LOG &" ;; stop) -
bigmonkeyboy revised this gist
Feb 27, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ start) echo "Starting Node-Red.." # su -l $USER -c "cd ~/.node-red && screen -dmS red node-red-pi --max-old-space-size=128" # or su -l $USER -c "node-red -u ~/.node-red > /tmp/node-red.log &" ;; stop)
NewerOlder