dietpi-notify

I saw this in the update to v 123 - how does it work?

Using dietpi-notify on the command line does nothing?

John

Hi John,

if I understand aright, it is more a function or subroutine so DietPi scripts can use it.

https://github.com/Fourdee/DietPi/blob/master/dietpi/func/dietpi-notify

or

cat /DietPi/dietpi/func/dietpi-notify

But it is not implement in a lot of scripts at the moment.

DietPi-Notify | New program with a goal to display more information on what DietPi is doing, and, if a failure or success occured. I will continue to improve this and add it to all DietPi scripts/programs over time.

But surely Fourdee can explain it better and in more details.

If I remember correctly, the idea is set up here: https://github.com/Fourdee/DietPi/issues/376#issuecomment-230155366

cu
k-plan

Yep, K-plan got it spot on.

Its basically a function script, that allows us to keep a visual style and colours, across all DietPi scripts.
Because bash scripts can’t talk to each other (No class support, like C++), instead of us coding in the colours and styles in each script, we just call the notify script and it does it all for us.

Some examples:

root@DietPi:~# /DietPi/dietpi/func/dietpi-notify 0 sucess
 [Ok] sucess
root@DietPi:~# /DietPi/dietpi/func/dietpi-notify 1 failure
 [Failed] failure
root@DietPi:~# /DietPi/dietpi/func/dietpi-notify 2 info
 [Info] info
root@DietPi:~# /DietPi/dietpi/func/dietpi-notify 3 DietPi-Program_Name Doingsomething

 DietPi-Program_Name
─────────────────────────────────────────────────────
 Mode: Doingsomething
 Please wait...