arrow1800 / Victron-VirtualBattery

8 stars 2 forks source link

uninstall script should change rc.local file #9

Closed drtinaz closed 1 year ago

drtinaz commented 1 year ago

The update to the uninstall script works correctly, except that upon system reboot the install script was ran again, thus reinstalling the driver. The uninstall script did not delete or comment out the reference line in rc.local. This should be done automatically as part of the uninstall script.

arrow1800 commented 1 year ago

i agree, will look into it.

arrow1800 commented 1 year ago

we probably need to add this line; still need to test it though

sed -i '/$SCRIPT_DIR\/install.sh/d' $filename

drtinaz commented 1 year ago

I seem to be going backwards here. I uninstalled yesterday and deleted the line in rc.local so it would not reinstall at reboot. everything worked ok yesterday. today I updated the files to the most recent ones here on the github and installed the virtual battery again. everything runs fine, but now when I run the uninstall script I get the following root@einstein:/# ./data/dbus-virtual-battery/uninstall.sh BusyBox v1.31.1 (2022-10-16 22:32:48 UTC) multi-call binary.

Usage: basename FILE [SUFFIX] rm: '/service' is a directory chmod: /service/run: No such file or directory ./data/dbus-virtual-battery/uninstall.sh: line 7: .//restart.sh: No such f ile or directory sed: -i requires an argument root@einstein:/#

edit to add: the issue seems to be related to the line above you said to add. once I removed that line the script worked again. I dunno?

arrow1800 commented 1 year ago

i had to modify the line a bit more for it to fully work. should be fixed now, please let me know

drtinaz commented 1 year ago

script works fine now