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

How to call alerter from script without blocking? #43

Open
dakshin-k opened this issue Oct 8, 2021 · 2 comments
Open

How to call alerter from script without blocking? #43

dakshin-k opened this issue Oct 8, 2021 · 2 comments

Comments

@dakshin-k
Copy link

Hi,

I'm trying to trigger a notification from inside a bash script, however I do not want the script to wait for a user to click on the notification. I want the script to fire the notification and then continue on to the next line.

I haven't been able to find a way to achieve this by going through the help message of the command - The closest solution I could find was to use the timeout flag, which still causes the script to be blocked for that many seconds.

Can someone please point me in the right direction?

@dakshin-k
Copy link
Author

This StackOverflow answer gave me the idea of wrapping the command in parantheses like so:

(alerter -message hello &>/dev/null &)

But I feel this isn't the best way to do it and it would be good if alerter had an option to send notifications silently

@term-i-nator
Copy link

...a very old question, but...

To continue with the script I use the "disown" command with alerter to throw it into its own independent (background-)process:

alerter -message "Hello World" > /dev/null & disown

With "disown" the message stays on screen even if the script ends.

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