Compare commits
2 Commits
d455e58b1a
...
49a0fcdce4
Author | SHA1 | Date |
---|---|---|
Ducky | 49a0fcdce4 | |
Ducky | c7d32b84a8 |
|
@ -157,7 +157,7 @@ function invoke_script() {
|
||||||
function trigger_notify() {
|
function trigger_notify() {
|
||||||
level="$1"
|
level="$1"
|
||||||
title="$2"
|
title="$2"
|
||||||
message="$3"
|
message="$(echo "$3" | sed -r "s/\x1B\[[0-9;]*[JKmsu]//g")"
|
||||||
log_path="$4"
|
log_path="$4"
|
||||||
notify_prog="/usr/local/bin/sh.zio.notify"
|
notify_prog="/usr/local/bin/sh.zio.notify"
|
||||||
|
|
||||||
|
@ -185,8 +185,6 @@ function trigger_notify() {
|
||||||
--message "$message" \
|
--message "$message" \
|
||||||
--title "$title"
|
--title "$title"
|
||||||
else
|
else
|
||||||
message="$(echo "$3" | sed -r "s/\x1B\[[0-9;]*[JKmsu]//g")"
|
|
||||||
|
|
||||||
"$notify_prog" \
|
"$notify_prog" \
|
||||||
--file "$log_path" \
|
--file "$log_path" \
|
||||||
--invoked-by "$(basename $me_filename)" \
|
--invoked-by "$(basename $me_filename)" \
|
||||||
|
@ -322,7 +320,11 @@ function print_time() {
|
||||||
[[ $m != "0" ]] && output+=" $m $m_string"
|
[[ $m != "0" ]] && output+=" $m $m_string"
|
||||||
[[ $s != "0" ]] && output+=" $s $s_string"
|
[[ $s != "0" ]] && output+=" $s $s_string"
|
||||||
|
|
||||||
echo $output
|
if [[ "$output" == "" ]]; then
|
||||||
|
echo "0 seconds"
|
||||||
|
else
|
||||||
|
echo $output
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_service() {
|
function start_service() {
|
||||||
|
|
Loading…
Reference in New Issue