-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed scripts for better reading #532
- Loading branch information
Showing
15 changed files
with
122 additions
and
81 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
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
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,23 @@ | ||
#!/bin/sh | ||
|
||
# remove comment for easier troubleshooting | ||
#set -x | ||
|
||
# backup config.ini | ||
if [ -f "/data/etc/dbus-serialbattery/config.ini" ]; then | ||
mv /data/etc/dbus-serialbattery/config.ini /data/etc/config.ini | ||
fi | ||
|
||
# remove old driver | ||
rm -rf /data/etc/dbus-serialbattery | ||
|
||
# extract driver | ||
tar -zxf ./venus-data.tar.gz -C /data | ||
|
||
# restore config.ini | ||
if [ -f "/data/etc/config.ini" ]; then | ||
mv /data/etc/config.ini /data/etc/dbus-serialbattery/config.ini | ||
fi | ||
|
||
# install driver | ||
sh /data/etc/dbus-serialbattery/reinstall-local.sh |
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
File renamed without changes.
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,27 @@ | ||
#!/bin/bash | ||
|
||
# remove comment for easier troubleshooting | ||
#set -x | ||
|
||
# copy config.ini in case it was changed | ||
cp -f /data/etc/dbus-serialbattery/config.ini /opt/victronenergy/dbus-serialbattery/config.ini | ||
|
||
# would not restart ble services | ||
# svc -d -u /service/dbus-serialbattery | ||
|
||
# kill driver, if running. It gets restarted by the service daemon | ||
pkill -f "python .*/$DRIVERNAME.py" | ||
|
||
|
||
# get BMS list from config file | ||
bluetooth_bms=$(awk -F "=" '/BLUETOOTH_BMS/ {print $2}' /data/etc/dbus-serialbattery/config.ini) | ||
# clear whitespaces | ||
bluetooth_bms_clean="$(echo $bluetooth_bms | sed 's/\s*,\s*/,/g')" | ||
# split into array | ||
IFS="," read -r -a bms_array <<< "$bluetooth_bms_clean" | ||
length=${#bms_array[@]} | ||
|
||
# restart bluetooth service, if Bluetooth BMS configured | ||
if [ $length -gt 0 ]; then | ||
/etc/init.d/bluetooth restart | ||
fi |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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