topkecleon / telegram-bot-bash

Telegram bot written in bash
Other
426 stars 123 forks source link

start_proc takes wrong arguments number #194

Open Megver83 opened 2 years ago

Megver83 commented 2 years ago

https://github.com/topkecleon/telegram-bot-bash/blob/4591b357d140334c1b6235b65bbc9c7fd701be93/modules/background.sh#L72

This line takes a 5th argument, skipping $3, which makes a script using start_proc to skip its first argument. I just started using this bot and I was breaking my head because I tried to run a script, which took the chat id as an argument, like this:

start_proc "${CHAT[ID]}" "bin/pcr.sh" "${CHAT[ID]}"

But had to do this:

start_proc "${CHAT[ID]}" "bin/pcr.sh" "dummy-arg" "${CHAT[ID]}"