Hermes-Secure-Email-Gateway
Hermes-Secure-Email-Gateway copied to clipboard
Syntax error in generated script.
Logging into the admin interface I am presented with the following warning box.
Examining the script, it contains:
#!/bin/bash df -hl | awk '/^\/dev\/mapper/ubuntu--vg-ubuntu--lv/ { sum+=$5 } END { print sum }'
Executing script:
awk: cmd. line:1: /^\/dev\/mapper/ubuntu--vg-ubuntu--lv/ { sum+=$5 } END { print sum } awk: cmd. line:1: ^ syntax error
It also looks like a new script is generated on each page load/refresh, is this expected behaviour?
Hi, a new script generated on each page load/refresh is expected behavior. The error is caused by the script not being able to handle LVM devices which unfortunately is the default behavior for Ubuntu during drive setup.
Issued a patch to fix this issue. Please download the script below and run it as root in your system to update the file in question and it should resolve the issue:
The patch creates a
get_system_root_filesystem_usage.cfm.1
file due to the existing version. Moving the old file to a backup folder and renaming the .1 the error is still generated, the generated code is still the same (trailing slash) . Is there somehting else that needs to be done after the file is installed? I've restarted . Is the .cfm data cached somewhere?
Fixed the script to delete the existing file and replace it with the new version. Can you try to run the new patch script:
https://raw.githubusercontent.com/deeztek/Hermes-Secure-Email-Gateway/master/patches/c93730b_issue_30.sh
If you still get the same error, can you share the output of the following command:
df -h
Thanks
closing issue as fixed. Please re-open if any more problems.