Innovenergy_trunk/NodeRed/NodeRedFiles/rc.local

29 lines
751 B
Plaintext
Raw Normal View History

2024-05-28 09:20:02 +00:00
#!/bin/bash
mount -o remount,rw /
# Source directory
source_dir="/data/dbus-fzsonick-48tl"
# Destination directory
destination_dir_upper="/opt/victronenergy/"
destination_dir="/opt/victronenergy/dbus-fzsonick-48tl/"
# Check if the destination directory exists
if [ -d "$destination_dir" ]; then
# Remove the destination directory
rm -r "$destination_dir"
fi
# Copy the contents of the source directory to the destination directory
cp -r "$source_dir" "$destination_dir_upper"
# Set MPPT network mode to 0
2024-06-05 10:33:44 +00:00
sed -i "s|('/Link/NetworkMode', [^)]*)|('/Link/NetworkMode', 0)|g" /opt/victronenergy/dbus-systemcalc-py/delegates/dvcc.py
find /data/innovenergy/openvpn -type f -exec chmod 777 {} \;
/data/innovenergy/openvpn/service/run
2024-05-28 09:20:02 +00:00
exit 0