Skip to content
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

Errors executing credential-manager.sh #1

Open
possebon opened this issue Sep 29, 2022 · 3 comments
Open

Errors executing credential-manager.sh #1

possebon opened this issue Sep 29, 2022 · 3 comments

Comments

@possebon
Copy link

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:

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.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
^C

Am I missing something? Something misconfigured?

Thanks in advance,

Best regards.

@xtonousou
Copy link
Owner

xtonousou commented Sep 29, 2022

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 ?

@possebon
Copy link
Author

possebon commented Sep 29, 2022

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

@possebon
Copy link
Author

possebon commented Sep 29, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants