diff --git a/README.md b/README.md index a329a02..c2db47c 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,9 @@ After that call the `install.sh script. ```bash wget -O main.zip https://github.com/henne49/dbus-opendtu/archive/refs/heads/main.zip unzip main.zip "dbus-opendtu-main/*" -d /data -mv /data/dbus-opendtu-main/config.ini /data/dbus-opendtu-main/config.template rm /data/dbus-opendtu/current.log* -cp -R /data/dbus-opendtu-main/* /data/dbus-opendtu +mv /data/dbus-opendtu-main/config.ini /data/dbus-opendtu-main/config.template +mv /data/dbus-opendtu-main /data/dbus-opendtu cp /data/dbus-opendtu/config.ini /data/dbus-opendtu/config.backup chmod a+x /data/dbus-opendtu/install.sh ``` diff --git a/dbus-opendtu.py b/dbus-opendtu.py index 05a7411..241668c 100644 --- a/dbus-opendtu.py +++ b/dbus-opendtu.py @@ -39,9 +39,9 @@ def main(): number_of_inverters = 0 try: - maxBytes = int(config["DEFAULT"]["MaxFileSize"]) *1024 + max_file_size = int(config["DEFAULT"]["MaxFileSize"]) *1024 except Exception: - maxBytes = 100*1024 + max_file_size = 100*1024 try: number_of_templates = int(config["DEFAULT"]["NumberOfTemplates"]) @@ -49,7 +49,7 @@ def main(): number_of_templates = 0 log_rotate_handler = logging.handlers.RotatingFileHandler( - maxBytes, + maxBytes=max_file_size, backupCount=1, encoding=None, delay=0,