Open possebon opened 2 years ago
Hello @possebon, thanks for opening an issue.
First of all, can you share some information of the system?
uname -a
cat /etc/*release
Also, can you confirm if it works when you run it with bash credential-manager.sh
?
Hi @xtonousou , thanks for your reply.
Sure, this is the results:
root@marcotextil-watch-proxy:/usr/lib/zabbix/externalscripts# uname -a
Linux marcotextil-watch-proxy 5.4.0-125-generic #141-Ubuntu SMP Wed Aug 10 13:42:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@marcotextil-watch-proxy:/usr/lib/zabbix/externalscripts# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
And running bash credential-manager.sh
root@marcotextil-watch-proxy:/usr/lib/zabbix/externalscripts# bash credential-manager.sh
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
^C
root@marcotextil-watch-proxy:/usr/lib/zabbix/externalscripts#
I'm also including this info:
root@marcotextil-watch-proxy:/usr/lib/zabbix/externalscripts# jq --version
jq-1.6
Even further information... I put some echo lines to help debug....
The first three lines are just variables from .env file, just checking if it loaded correctly.
root@marcotextil-watch-proxy:/usr/lib/zabbix/externalscripts# ./credential-manager.sh
10.171.129.11
1.0-rev1
/tmp/.veeam-zabbix.json
Entered main() and showing initial sleep_time
300
Entered on if of while do
Entered lock_file()
After the touch and leaving the lock_file()
Entered unlock_file()
Leaving unlock_file()
parse error: Invalid numeric literal at line 1, column 8
Second sleep_time value - after jq -r -M
Third sleep_time value
-60
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
Hi @xtonousou,
I cloned your solution and tried to run on Ubuntu 20.04.
When I execute manually the ./credential-manager.sh to test, I'm getting this return:
Am I missing something? Something misconfigured?
Thanks in advance,
Best regards.