summarylogtreecommitdiffstats
path: root/blynk-start.sh
blob: 3c40259a0135bf6c9673c2b4a6646e1f29d36ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
## This script executes the blynk server.
## It should not be run manually, please use systemd unit instead.

# additional options to pass to blynk server
additionalOptions=

# add sms.properties if found
if [ -f /etc/blynk/sms.properties ]; then
    additionalOptions="-smsConfig /etc/blynk/sms.properties"
fi

# add mail.properties if found
if [ -f /etc/blynk/mail.properties ]; then
    additionalOptions="-mailConfig /etc/blynk/mail.properties ${additionalOptions}"
fi

exec /usr/bin/java -jar /usr/share/blynk/blynk-server.jar -serverConfig /etc/blynk/server.properties ${additionalOptions}