-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Running Blynk server as service and update setup script
- Loading branch information
Nander Hokwerda
committed
May 30, 2019
1 parent
87d9ed6
commit 74dbaf4
Showing
5 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#! /bin/sh | ||
# /etc/init.d/blynkserver | ||
|
||
### BEGIN INIT INFO | ||
# Provides: blynkserver | ||
# Required-Start: $remote_fs $syslog | ||
# Required-Stop: $remote_fs $syslog | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Simple script to start a program at boot | ||
# Description: A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown. | ||
### END INIT INFO | ||
|
||
# If you want a command to always run, put it here | ||
|
||
# Carry out specific functions when asked to by the system | ||
case "$1" in | ||
start) | ||
echo "Starting Blynk Server" | ||
# run application you want to start | ||
java -jar /opt/blynkserver/server-0.41.6-java8.jar -dataFolder /opt/blynkserver/data & | ||
;; | ||
stop) | ||
echo "Stopping Blynk Server" | ||
# kill application you want to stop | ||
PID = ps -ef | grep 'blynk' | grep -v grep | awk '{print $2}' | tail -n 1 | ||
kill $PID | ||
;; | ||
*) | ||
echo "Usage: /etc/init.d/blynkserver {start|stop}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains 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 characters
Binary file modified
BIN
-18 Bytes
(100%)
Software/Controller/smokey_mc_smokerson/__pycache__/blynk_interface.cpython-37.pyc
Binary file not shown.
Binary file modified
BIN
+68 Bytes
(100%)
Software/Controller/smokey_mc_smokerson/__pycache__/temperature_controller.cpython-37.pyc
Binary file not shown.