-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduction of an Upgrade Script #223
Conversation
… to pull the latest or other releases without copying all steps manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I haven't tried it, but I trust you enough to know it will work :-)
if you have some time, it would be nice if you could test it |
I'll check it during the day. Sorry for the late response. I had a busy week. |
no problem, the script is now also extend to automatically search for install folders and can also be used to install the script in a new folder. |
Just an recommendation accept also "y" for a yes. See: <enne49/dbus-opendtu/refs/heads/Update_Script/update.sh )"
Found folders:
1. /data/dbus-opendtu
2. /data/dbus-opendtu2
3. /data/dbus-goecharger
4. Enter folder manually
Enter the number of the folder you want to use: 1
Using folder: /data/dbus-opendtu
SCRIPT_DIR is not the current working directory.
The directory /data/dbus-opendtu does not exist. Do you want to create it? (yes/no) y
Directory creation cancelled. Exiting... Try 2: <tent.com/henne49/dbus-opendtu/refs/heads/Update_Script/update.sh )"
Found folders:
1. /data/dbus-opendtu
2. /data/dbus-opendtu2
3. /data/dbus-goecharger
4. Enter folder manually
Enter the number of the folder you want to use: 1
Using folder: /data/dbus-opendtu
SCRIPT_DIR is not the current working directory.
The directory /data/dbus-opendtu does not exist. Do you want to create it? (yes/no) yes
Directory /data/dbus-opendtu created successfully.
No version.txt file found in the selected directory.
Enter the version to download (e.g. main, v1.2.25, or press enter for latest):
INSTALLED VERSION (none) will be updated with VERSION (latest). Do you want to continue? (yes/no) yes
--2024-11-09 10:49:00-- https://github.com/henne49/dbus-opendtu/archive/v1.2.40.zip
Resolving github.com... 140.82.121.3
Connecting to github.com|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/henne49/dbus-opendtu/zip/refs/tags/v1.2.40 [following]
--2024-11-09 10:49:01-- https://codeload.github.com/henne49/dbus-opendtu/zip/refs/tags/v1.2.40
Resolving codeload.github.com... 140.82.121.9
Connecting to codeload.github.com|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘/data/dbus-opendtu/v1.2.40.zip’
/data/dbus-opendtu/v1.2.4 [ <=> ] 28.04K --.-KB/s in 0.009s
2024-11-09 10:49:01 (2.94 MB/s) - ‘/data/dbus-opendtu/v1.2.40.zip’ saved [28713]
Archive: /data/dbus-opendtu/v1.2.40.zip
creating: dbus-opendtu-1.2.40/
inflating: dbus-opendtu-1.2.40/.gitattributes
inflating: dbus-opendtu-1.2.40/GitVersion.yml
inflating: dbus-opendtu-1.2.40/LICENSE
inflating: dbus-opendtu-1.2.40/config.example
inflating: dbus-opendtu-1.2.40/constants.py
inflating: dbus-opendtu-1.2.40/dbus-opendtu.py
inflating: dbus-opendtu-1.2.40/dbus_service.py
creating: dbus-opendtu-1.2.40/docs/
inflating: dbus-opendtu-1.2.40/docs/ahoy_0.5.93_inverter-id-0.json
inflating: dbus-opendtu-1.2.40/docs/ahoy_0.5.93_inverter-id-1.json
inflating: dbus-opendtu-1.2.40/docs/ahoy_0.5.93_live.json
inflating: dbus-opendtu-1.2.40/docs/ahoy_0.5.93_record-live.json
inflating: dbus-opendtu-1.2.40/docs/ahoy_0.6.9_live.json
inflating: dbus-opendtu-1.2.40/docs/ahoy_0.7.36_live_gap_in_inverter_sequence.json
inflating: dbus-opendtu-1.2.40/docs/ahoy_pre_0.5.93.json
inflating: dbus-opendtu-1.2.40/docs/opendtu_status.json
inflating: dbus-opendtu-1.2.40/docs/opendtu_v24.2.12_inverter.json
inflating: dbus-opendtu-1.2.40/docs/opendtu_v24.2.12_livedata_status.json
inflating: dbus-opendtu-1.2.40/docs/tasmota_shelly_2pm.json
inflating: dbus-opendtu-1.2.40/helpers.py
inflating: dbus-opendtu-1.2.40/install.sh
inflating: dbus-opendtu-1.2.40/restart.sh
creating: dbus-opendtu-1.2.40/service/
creating: dbus-opendtu-1.2.40/service/log/
inflating: dbus-opendtu-1.2.40/service/log/run
inflating: dbus-opendtu-1.2.40/service/run
inflating: dbus-opendtu-1.2.40/test_helpers.py
inflating: dbus-opendtu-1.2.40/tests.py
inflating: dbus-opendtu-1.2.40/uninstall.sh
inflating: dbus-opendtu-1.2.40/version.txt
dbus-opendtu-1.2.40
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
config.ini file not found. Please make sure it exists. If not created yet, please copy it from config.example.
root@raspberrypi4:~# Initial there is no log file. root@raspberrypi4:~# vi /var/log/dbus-
dbus-adc/ dbus-generator-starter/ dbus-shelly/
dbus-digitalinputs/ dbus-modbus-client/ dbus-systemcalc-py/
dbus-fronius/ dbus-qwacs/ dbus-vebus-to-pvinverter/ We should adjust the script a little bit see: root@raspberrypi4:/data/dbus-opendtuBAK# cp config.ini ../dbus-opendtu
root@raspberrypi4:/data/dbus-opendtuBAK# cd ../dbus-opendtu
root@raspberrypi4:/data/dbus-opendtu# ./restart.sh
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
root@raspberrypi4:/data/dbus-opendtu# ./install.sh
root@raspberrypi4:/data/dbus-opendtu# After that its working: |
* prepare documentation to use latest stable release for install and code update * line was double * Update README.md Co-authored-by: Maurice Schmicking <[email protected]> * Update the code modified and reworked the update code as proposed --------- Co-authored-by: Maurice Schmicking <[email protected]>
create an update script, that can be run from the installation folder to pull the latest or other releases without copying all steps manually.